Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e9f9b6c
Unpin scipy and update statsmodels in order to get rid of import error
nasaul Jan 6, 2026
d035fd2
Restricts pyspark version for windows
nasaul Jan 6, 2026
677c7f1
unpin pandas
nasaul Jan 6, 2026
eb8fa47
Updates distributed dependencies
nasaul Jan 6, 2026
f28eb4d
Restricts fugue ray on windows
nasaul Jan 6, 2026
b05a278
Removes ray installation on windows
nasaul Jan 7, 2026
bad4d6c
Removes Ray testing suite
nasaul Jan 7, 2026
f8aa843
Pins down scipy for macos 3.9
nasaul Jan 7, 2026
be6d146
Changed the pinned version for python 3.9
nasaul Jan 7, 2026
721980d
Removes platform constraints
nasaul Jan 7, 2026
30d9bdb
Restricts pandas and numpy for python 3.9
nasaul Jan 7, 2026
b7af7ca
Rolls back on fugue version
nasaul Jan 7, 2026
2af63e0
Restricts ray version for python 3.9
nasaul Jan 7, 2026
f4b21d9
Updates Ray restriction
nasaul Jan 7, 2026
4714ccd
Restricts numpy and pandas for python 3.9
nasaul Jan 7, 2026
2abe672
Updates ray restrictions for python 3.9
nasaul Jan 7, 2026
d8afb39
Update dependencies
nasaul Jan 7, 2026
e3e45c8
Unpins ray version
nasaul Jan 7, 2026
6c3e79c
Removes pins in Ray
nasaul Jan 7, 2026
d694af6
Debug printing
nasaul Jan 7, 2026
96b6ed9
Update
nasaul Jan 7, 2026
e3194cc
Update test to ensure ray shutdown
nasaul Jan 7, 2026
b939afd
Rolls back testing
nasaul Jan 7, 2026
a955c91
Reduces max_length
nasaul Jan 7, 2026
ff7d5fe
Restricts rays with low resource config
nasaul Jan 7, 2026
d9125df
Skips Ray installation for Python 3.9
nasaul Jan 7, 2026
412381b
Installs Ray in Python 3.9
nasaul Jan 7, 2026
6afa63a
Update distributed tests
nasaul Jan 7, 2026
7245ef2
Don't include dashboard
nasaul Jan 7, 2026
f5e7b76
Updates ray session
nasaul Jan 7, 2026
9144078
Rolls back on test_distributed_core
nasaul Jan 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ dependencies = [
"llvmlite>=0.41.0,<0.43.0 ; sys_platform == 'win32' and python_version >= '3.10' and python_version < '3.12'",
"numpy>=1.21.6",
"pandas>=1.3.5",
"scipy>=1.7.3,<1.16.0",
"statsmodels>=0.13.2",
"scipy>=1.7.3,<1.14 ; python_version < '3.10'",
"scipy>=1.7.3 ; python_version >= '3.10'",
"statsmodels>=0.14.5",
"tqdm",
"fugue>=0.8.1",
"utilsforecast>=0.1.4",
Expand Down Expand Up @@ -67,14 +68,8 @@ dev = [
"pip-licenses",
]
dask = ["dask<=2024.12.1", "fugue[dask]>=0.8.1"]
ray = [
"fugue[ray]>=0.8.1 ; python_version < '3.12'",
"protobuf>=3.15.3,<4.0.0 ; python_version < '3.12'",
"numpy<2 ; python_version < '3.12'",
"pandas<2.2 ; python_version < '3.12'",
"ray<=2.10 ; python_version < '3.12'",
]
spark = ["fugue[spark]>=0.8.1"]
ray = ["fugue[ray]>=0.9.4", "protobuf>=3.15.3,<4.0.0 ; python_version < '3.12'"]
spark = ["fugue[spark]>=0.8.1", "pyspark<4.1.0; sys_platform == 'win32'"]
plotly = ["plotly", "plotly-resampler"]
polars = ["polars[numpy]"]
docs = [
Expand All @@ -84,8 +79,10 @@ docs = [
]
all = [
"dask<=2024.12.1",
"fugue[dask]>=0.8.1",
"fugue[spark]>=0.8.1",
"fugue[dask]>=0.9.4",
"fugue[spark]>=0.9.4",
"fugue[ray]>=0.9.4; sys_platform != 'win32'",
"pyspark<4.1.0; sys_platform == 'win32'",
"plotly",
"plotly-resampler",
"polars[numpy]",
Expand All @@ -107,11 +104,8 @@ all = [
"setuptools<70",
"supersmoother",
"yfinance",
"fugue[ray]>=0.8.1 ; python_version < '3.12'",
"protobuf>=3.15.3,<4.0.0 ; python_version < '3.12'",
"numpy<2 ; python_version < '3.12'",
"pandas<2.2 ; python_version < '3.12'",
"ray<=2.10 ; python_version < '3.12'",
"numpy",
]

[tool.setuptools]
Expand Down
42 changes: 36 additions & 6 deletions tests/test_distributed_fugue.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pandas as pd
import pytest

if not sys.version_info >= (3, 12):
if sys.platform != "win32":
import ray
from dask.distributed import Client
from fugue_dask import DaskExecutionEngine
Expand Down Expand Up @@ -185,17 +185,47 @@ def test_distribute_cv_predictions(df):


# # | eval: false
@pytest.fixture(scope="module")
def ray_session():
"""Initialize Ray once for all tests in this module and shutdown afterwards."""
if sys.platform == "win32":
yield None
return

# Initialize Ray with runtime environment to exclude large files
if not ray.is_initialized():
ray.init(
num_cpus=2,
ignore_reinit_error=True,
include_dashboard=False,
_metrics_export_port=None,
runtime_env={
"working_dir": None, # Don't upload working directory for local testing
},
)

yield ray

# Cleanup: shutdown Ray after all tests in this module complete
if ray.is_initialized():
ray.shutdown()


@pytest.fixture
def ray_df():
def ray_df(ray_session):
"""Generate test data as Ray Dataset."""
if sys.platform == "win32":
pytest.skip("Ray is in beta for Windows.")

# Generate Synthetic Panel Data.
df = generate_series(10).reset_index()
df = generate_series(5).reset_index()
df["unique_id"] = df["unique_id"].astype(str)
df = ray.data.from_pandas(df).repartition(2)
return df


@pytest.mark.skipif(
sys.version_info >= (3, 12), reason="This test is not compatible with Python 3.12+"
sys.platform == "win32", reason="Ray is in beta for Windows."
)
def test_ray_cv_predictions(ray_df):
df = ray_df
Expand Down Expand Up @@ -231,7 +261,7 @@ def test_ray_cv_predictions(ray_df):


@pytest.mark.skipif(
sys.version_info >= (3, 12), reason="This test is not compatible with Python 3.12+"
sys.platform == "win32", reason="Ray is in beta for Windows."
)
def test_ray_cv_fallback_model(ray_df):
df = ray_df
Expand All @@ -249,7 +279,7 @@ def test_ray_cv_fallback_model(ray_df):
pd.testing.assert_frame_equal(fcst_fugue.astype(fcst_stats.dtypes), fcst_stats)

@pytest.mark.skipif(
sys.version_info >= (3, 12), reason="This test is not compatible with Python 3.12+"
sys.platform == "win32", reason="Ray is in beta for Windows."
)
def test_ray_distributed_exogenous_regressors(df_w_ex):
df_w_ex, train_df, test_df, xreg = df_w_ex
Expand Down