Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Retribution98 committed Feb 28, 2024
1 parent 5061311 commit 21e0e05
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
23 changes: 1 addition & 22 deletions modin/pandas/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from modin.error_message import ErrorMessage
from modin.logging import disable_logging
from modin.pandas import Categorical
from modin.pandas.io import from_non_pandas, from_pandas, to_pandas, from_ray, to_ray
from modin.pandas.io import from_non_pandas, from_pandas, to_pandas, to_ray

Check notice

Code scanning / CodeQL

Cyclic import Note

Import of module
modin.pandas.io
begins an import cycle.
from modin.utils import (
MODIN_UNNAMED_SERIES_LABEL,
_inherit_docstrings,
Expand Down Expand Up @@ -921,27 +921,6 @@ def from_dict(
)
)

@classmethod
def from_ray(cls, ray_obj):
"""
Convert a Ray Dataset into Modin DataFrame.
Parameters
----------
ray_obj : ray.data.Dataset
The Ray Dataset to convert from.
Returns
-------
DataFrame
A new Modin DataFrame object.
Notes
-----
Ray Dataset may only be converted to Modin Dataframe if Modin uses a Ray engine.
"""
return from_ray(ray_obj)

@classmethod
def from_records(
cls,
Expand Down
4 changes: 2 additions & 2 deletions modin/pandas/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_dataframe_api_equality():

ignore_in_pandas = ["timetuple"]
# modin - namespace for using experimental functionality
ignore_in_modin = ["modin", "to_pandas"]
ignore_in_modin = ["modin", "to_pandas", "to_ray"]
missing_from_modin = set(pandas_dir) - set(modin_dir)
assert not len(
missing_from_modin - set(ignore_in_pandas)
Expand All @@ -164,7 +164,7 @@ def test_dataframe_api_equality():
), "Differences found in API: {}".format(set(modin_dir) - set(pandas_dir))

# These have to be checked manually
allowed_different = ["to_hdf", "hist", "modin", "to_pandas"]
allowed_different = ["to_hdf", "hist", "modin", "to_pandas", "to_ray"]

assert_parameters_eq((pandas.DataFrame, pd.DataFrame), modin_dir, allowed_different)

Expand Down
2 changes: 1 addition & 1 deletion modin/pandas/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3246,7 +3246,7 @@ def test_to_ray():
RuntimeError,
match="Modin Dataframe may only be converted to a Ray Dataset if Modin uses a Ray engine.",
):
_= modin_df.to_ray()
_ = modin_df.to_ray()


@pytest.mark.filterwarnings(default_to_pandas_ignore_string)
Expand Down

0 comments on commit 21e0e05

Please sign in to comment.