Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Retribution98 committed Mar 1, 2024
1 parent 29fd01a commit 5e92320
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modin/pandas/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ def test_series_api_equality():
assert not len(missing_from_modin), "Differences found in API: {}".format(
missing_from_modin
)
ignore_in_modin = ["to_pandas"]
ignore_in_modin = ["to_pandas", "to_ray_dataset"]
extra_in_modin = set(modin_dir) - set(ignore_in_modin) - set(pandas_dir)
assert not len(extra_in_modin), "Differences found in API: {}".format(
extra_in_modin
)

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

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

Expand Down
23 changes: 23 additions & 0 deletions modin/pandas/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3230,6 +3230,9 @@ def test_to_period():
df_equals(modin_df.to_period(), pandas_df.to_period())


@pytest.mark.xfail(
reason="Ray-2.9.3 has a problem using pandas 2.2.0. It will be resolved in the next release of Ray."
)
@pytest.mark.filterwarnings(default_to_pandas_ignore_string)
def test_to_ray_dataset():
index = pandas.DatetimeIndex(
Expand All @@ -3249,6 +3252,26 @@ def test_to_ray_dataset():
_ = modin_df.to_ray_dataset()


@pytest.mark.xfail(
reason="Ray-2.9.3 has a problem using pandas 2.2.0. It will be resolved in the next release of Ray."
)
@pytest.mark.filterwarnings(default_to_pandas_ignore_string)
def test_series_to_ray_dataset():
index = pandas.DatetimeIndex(
pandas.date_range("2000", freq="h", periods=len(TEST_DATA["col1"]))
)
# A Pandas DataFrame with column names of non-str types is not supported by Ray Dataset.
index = [str(x) for x in index]
pandas_df = pandas.DataFrame(TEST_DATA, index=index)
pandas_s = pandas_df.iloc[0]
modin_s = pd.Series(pandas_s)
ray_dataset = modin_s.to_ray_dataset()
df_equals(ray_dataset.to_pandas().squeeze(), pandas_s)


@pytest.mark.xfail(
reason="Ray-2.9.3 has a problem using pandas 2.2.0. It will be resolved in the next release of Ray."
)
@pytest.mark.skipif(
condition=Engine.get() != "Ray",
reason="Ray Dataset creation is only available for Ray engine",
Expand Down

0 comments on commit 5e92320

Please sign in to comment.