Skip to content

Commit

Permalink
FIX-#4566: Pin Ray < 1.13.0 to avoid deserialization race condition. (#…
Browse files Browse the repository at this point in the history
…4567)

Signed-off-by: mvashishtha <[email protected]>
  • Loading branch information
mvashishtha authored and vnlitvinov committed Jun 16, 2022
1 parent efdfbac commit 68d1433
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docs/requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ pyyaml
recommonmark
sphinx
sphinx-click
# Pin ray to < 1.13.0 to work around GH#4564
# TODO(https://github.com/modin-project/modin/issues/4564): let ray go past 1.13.0.
ray[default]>=1.4.0,<1.13.0
git+https://github.com/modin-project/modin.git@master#egg=modin[all]
sphinxcontrib_plantuml
sphinx-issues
Expand Down
4 changes: 3 additions & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ dependencies:
- modin-spreadsheet>=0.1.1
- tqdm
- git+https://github.com/airspeed-velocity/asv.git@ef016e233cb9a0b19d517135104f49e0a3c380e9
- ray[default]>=1.4.0
# Pin ray to < 1.13.0 to work around GH#4564
# TODO(https://github.com/modin-project/modin/issues/4564): let ray go past 1.13.0.
- ray[default]>=1.4.0,<1.13.0
- connectorx>=0.2.6a4
# TODO: remove when resolving GH#4398
- redis>=3.5.0,<4.0.0
Expand Down
15 changes: 12 additions & 3 deletions modin/config/envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def _get_default(cls):
-------
str
"""
from modin.utils import MIN_RAY_VERSION, MIN_DASK_VERSION
from modin.utils import (
MIN_RAY_VERSION,
MAX_RAY_VERSION_EXCLUSIVE,
MIN_DASK_VERSION,
)

if IsDebug.get():
return "Python"
Expand All @@ -91,9 +95,14 @@ def _get_default(cls):
except ImportError:
pass
else:
if version.parse(ray.__version__) < MIN_RAY_VERSION:
if (
version.parse(ray.__version__) < MIN_RAY_VERSION
or version.parse(ray.__version__) >= MAX_RAY_VERSION_EXCLUSIVE
):
raise ImportError(
f"Please `pip install modin[ray]` to install compatible Ray version (>={MIN_RAY_VERSION})."
"Please `pip install modin[ray]` to install compatible Ray "
+ "version "
+ f"(>={MIN_RAY_VERSION},<{MAX_RAY_VERSION_EXCLUSIVE})."
)
return "Ray"
try:
Expand Down
3 changes: 3 additions & 0 deletions modin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
from modin._version import get_versions

MIN_RAY_VERSION = version.parse("1.4.0")
# TODO(https://github.com/modin-project/modin/issues/4564):
# once ray can go past 1.13.0, remove this constant and stop checking it.
MAX_RAY_VERSION_EXCLUSIVE = version.parse("1.13.0")
MIN_DASK_VERSION = version.parse("2.22.0")

PANDAS_API_URL_TEMPLATE = f"https://pandas.pydata.org/pandas-docs/version/{pandas.__version__}/reference/api/{{}}.html"
Expand Down
4 changes: 3 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ numpy>=1.18.5
pyarrow>=4.0.1
dask[complete]>=2.22.0,<2022.2.0
distributed>=2.22.0,<2022.2.0
ray[default]>=1.4.0
# Pin ray to < 1.13.0 to work around GH#4564
# TODO(https://github.com/modin-project/modin/issues/4564): let ray go past 1.13.0.
ray[default]>=1.4.0,<1.13.0
redis>=3.5.0,<4.0.0
psutil==5.6.6
fsspec
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

dask_deps = ["dask>=2.22.0,<2022.2.0", "distributed>=2.22.0,<2022.2.0"]
# TODO: remove redis dependency when resolving GH#4398
ray_deps = ["ray[default]>=1.4.0", "pyarrow>=4.0.1", "redis>=3.5.0,<4.0.0"]
# Pin ray to < 1.13.0 to work around GH#4564
# TODO(https://github.com/modin-project/modin/issues/4564): let ray go past 1.13.0.
ray_deps = ["ray[default]>=1.4.0,<1.13.0", "pyarrow>=4.0.1", "redis>=3.5.0,<4.0.0"]
remote_deps = ["rpyc==4.1.5", "cloudpickle", "boto3"]
spreadsheet_deps = ["modin-spreadsheet>=0.1.0"]
sql_deps = ["dfsql>=0.4.2", "pyparsing<=2.4.7"]
Expand Down

0 comments on commit 68d1433

Please sign in to comment.