Skip to content

Commit

Permalink
FIX-#7277: Remove Cudf storage format as unmaintained (#7290)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
  • Loading branch information
anmyachev authored May 29, 2024
1 parent 2006292 commit 002125b
Show file tree
Hide file tree
Showing 31 changed files with 3 additions and 1,931 deletions.
6 changes: 0 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ def noop_decorator(*args, **kwargs):

# fake modules if they're missing
for mod_name in (
"cudf",
"cupy",
"xgboost",
"unidist",
"unidist.config",
Expand All @@ -39,10 +37,6 @@ def noop_decorator(*args, **kwargs):
sys.modules[mod_name] = types.ModuleType(
mod_name, f"fake {mod_name} for building docs"
)
if not hasattr(sys.modules["cudf"], "DataFrame"):
sys.modules["cudf"].DataFrame = type("DataFrame", (object,), {})
if not hasattr(sys.modules["cupy"], "ndarray"):
sys.modules["cupy"].ndarray = type("ndarray", (object,), {})
if not hasattr(sys.modules["xgboost"], "Booster"):
sys.modules["xgboost"].Booster = type("Booster", (object,), {})
if not hasattr(sys.modules["unidist"], "remote"):
Expand Down
6 changes: 0 additions & 6 deletions docs/development/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,6 @@ documentation page on :doc:`contributing </development/contributing>`.
- Uses native python execution - mainly used for debugging.
- The storage format is `pandas` and the in-memory partition type is a pandas DataFrame.
- For more information on the execution path, see the :doc:`pandas on Python </flow/modin/core/execution/python/implementations/pandas_on_python/index>` page.
- cuDF on Ray (experimental)
- Uses the Ray_ execution framework.
- The storage format is `cudf` and the in-memory partition type is a cuDF DataFrame.
- For more information on the execution path, see the :doc:`cuDF on Ray </flow/modin/core/execution/ray/implementations/cudf_on_ray/index>` page.

.. _directory-tree:

Expand Down Expand Up @@ -300,7 +296,6 @@ details. The documentation covers most modules, with more docs being added every
│ │ │ │ ├───common
│ │ │ │ ├─── :doc:`generic </flow/modin/core/execution/ray/generic>`
│ │ │ │ └───implementations
│ │ │ │ ├─── :doc:`cudf_on_ray </flow/modin/core/execution/ray/implementations/cudf_on_ray/index>`
│ │ │ │ └─── :doc:`pandas_on_ray </flow/modin/core/execution/ray/implementations/pandas_on_ray/index>`
│ │ │ └───unidist
│ │ │ ├───common
Expand All @@ -310,7 +305,6 @@ details. The documentation covers most modules, with more docs being added every
│ │ ├─── :doc:`io </flow/modin/core/io/index>`
│ │ └─── :doc:`storage_formats </flow/modin/core/storage_formats/index>`
│ │ ├─── :doc:`base </flow/modin/core/storage_formats/base/query_compiler>`
│ │ ├───cudf
│ │ └─── :doc:`pandas </flow/modin/core/storage_formats/pandas/index>`
│ ├───distributed
│ │ ├───dataframe
Expand Down
1 change: 0 additions & 1 deletion docs/flow/modin/core/dataframe/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Engine specific:
Execution system specific:

* :doc:`Modin PandasOnRayDataframe </flow/modin/core/execution/ray/implementations/pandas_on_ray/index>` is a specialization of the Core Modin Dataframe for ``PandasOnRay`` execution.
* :doc:`Modin cuDFOnRayDataframe </flow/modin/core/execution/ray/implementations/cudf_on_ray/index>` is a specialization of the Core Modin Dataframe for ``cuDFOnRay`` execution.
* :doc:`Modin PandasOnDaskDataframe </flow/modin/core/execution/dask/implementations/pandas_on_dask/index>` is specialization of the Core Modin Dataframe for ``PandasOnDask`` execution.
* :doc:`Modin PandasOnPythonDataframe </flow/modin/core/execution/python/implementations/pandas_on_python/index>` is a specialization of the Core Modin Dataframe for ``PandasOnPython`` execution.
* :doc:`Modin PandasOnUnidistDataframe </flow/modin/core/execution/unidist/implementations/pandas_on_unidist/index>` is a specialization of the Core Modin Dataframe for ``PandasOnUnidist`` execution.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions docs/flow/modin/core/storage_formats/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,5 @@ High-level module overview

This module houses submodules of all of the stable storage formats:

..
TODO: Insert a link to <cuDF module> when it is added (issue #3323)
- :doc:`Base module <base/query_compiler>` contains an abstract query compiler class which defines common API.
- :doc:`Pandas module <pandas/index>` contains query compiler and text parsers for pandas storage format.
- cuDF module contains query compiler and text parsers for cuDF storage format.
7 changes: 2 additions & 5 deletions modin/config/envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class StorageFormat(EnvironmentVariable, type=str):

varname = "MODIN_STORAGE_FORMAT"
default = "Pandas"
choices = ("Pandas", "Cudf")
choices = ("Pandas",)


class IsExperimental(EnvironmentVariable, type=bool):
Expand Down Expand Up @@ -412,10 +412,7 @@ def _get_default(cls) -> int:
-------
int
"""
if StorageFormat.get() == "Cudf":
return GpuCount.get()
else:
return CpuCount.get()
return CpuCount.get()

@classmethod
def get(cls) -> int:
Expand Down
17 changes: 0 additions & 17 deletions modin/core/execution/dispatching/factories/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import pandas
from pandas.util._decorators import doc

from modin.config import IsExperimental
from modin.core.io import BaseIO
from modin.utils import get_current_execution

Expand Down Expand Up @@ -778,19 +777,3 @@ def prepare(cls):
)

cls.io_cls = PandasOnUnidistIO


# EXPERIMENTAL FACTORIES
# Factories that operate only in experimental mode. They provide access to executions
# that have little coverage of implemented functionality or are not stable enough.
@doc(_doc_factory_class, execution_name="cuDFOnRay")
class ExperimentalCudfOnRayFactory(BaseFactory):
@classmethod
@doc(_doc_factory_prepare_method, io_module_name="``cuDFOnRayIO``")
def prepare(cls):
from modin.core.execution.ray.implementations.cudf_on_ray.io import cuDFOnRayIO

if not IsExperimental.get():
raise ValueError("'CudfOnRay' only works in experimental mode.")

cls.io_cls = cuDFOnRayIO
18 changes: 1 addition & 17 deletions modin/core/execution/ray/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
RayInitCustomResources,
RayRedisAddress,
RayRedisPassword,
StorageFormat,
ValueSource,
)
from modin.core.execution.utils import set_env
Expand Down Expand Up @@ -139,17 +138,6 @@ def initialize_ray(
with set_env(**env_vars):
ray.init(**ray_init_kwargs)

if StorageFormat.get() == "Cudf":
from modin.core.execution.ray.implementations.cudf_on_ray.partitioning import (
GPU_MANAGERS,
GPUManager,
)

# Check that GPU_MANAGERS is empty because _update_engine can be called multiple times
if not GPU_MANAGERS:
for i in range(GpuCount.get()):
GPU_MANAGERS.append(GPUManager.remote(i))

# Now ray is initialized, check runtime env config - especially useful if we join
# an externally pre-configured cluster
runtime_env_vars = ray.get_runtime_context().runtime_env.get("env_vars", {})
Expand All @@ -162,11 +150,7 @@ def initialize_ray(
)

num_cpus = int(ray.cluster_resources()["CPU"])
num_gpus = int(ray.cluster_resources().get("GPU", 0))
if StorageFormat.get() == "Cudf":
NPartitions._put(num_gpus)
else:
NPartitions._put(num_cpus)
NPartitions._put(num_cpus)

# TODO(https://github.com/ray-project/ray/issues/28216): remove this
# workaround once Ray gives a better way to suppress task errors.
Expand Down
14 changes: 0 additions & 14 deletions modin/core/execution/ray/implementations/cudf_on_ray/__init__.py

This file was deleted.

This file was deleted.

Loading

0 comments on commit 002125b

Please sign in to comment.