From d30b219e4c3aac9069959da8f27448e6fc6f1f0f Mon Sep 17 00:00:00 2001 From: mvashishtha Date: Fri, 10 Jun 2022 05:32:36 -0500 Subject: [PATCH 1/5] FIX-#4566: Pin Ray < 1.13.0 to avoid deserialization race condition. Signed-off-by: mvashishtha --- environment-dev.yml | 4 +++- requirements-dev.txt | 4 +++- setup.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index 6e1b904f029..a635b3f002a 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -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 diff --git a/requirements-dev.txt b/requirements-dev.txt index 7fddfeb34c5..2495e63a3e5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -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 diff --git a/setup.py b/setup.py index 444ee832667..6794164d375 100644 --- a/setup.py +++ b/setup.py @@ -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"] From 7612af6f967aced0920d140de6e53ce3a30f649e Mon Sep 17 00:00:00 2001 From: mvashishtha Date: Fri, 10 Jun 2022 06:47:59 -0500 Subject: [PATCH 2/5] Check that ray < 1.13.0. Signed-off-by: mvashishtha --- modin/config/envvars.py | 15 ++++++++++++--- modin/utils.py | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/modin/config/envvars.py b/modin/config/envvars.py index c49770c5120..d475ae906de 100644 --- a/modin/config/envvars.py +++ b/modin/config/envvars.py @@ -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" @@ -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: diff --git a/modin/utils.py b/modin/utils.py index f2a7f9d61b3..865dd5a2500 100644 --- a/modin/utils.py +++ b/modin/utils.py @@ -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" From 0872566309ad61f75bbc3059c579b611ade8df5e Mon Sep 17 00:00:00 2001 From: mvashishtha Date: Mon, 13 Jun 2022 10:13:08 -0500 Subject: [PATCH 3/5] Try deleting doc requirement of master modin, which requires the bad version of ray. Signed-off-by: mvashishtha --- docs/requirements-doc.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/requirements-doc.txt b/docs/requirements-doc.txt index 695cf7812bb..edd5f67a0a4 100644 --- a/docs/requirements-doc.txt +++ b/docs/requirements-doc.txt @@ -9,7 +9,6 @@ pyyaml recommonmark sphinx sphinx-click -git+https://github.com/modin-project/modin.git@master#egg=modin[all] sphinxcontrib_plantuml sphinx-issues xgboost From 493d6e50acab11f22d12cb3f04d3fcecccb6c790 Mon Sep 17 00:00:00 2001 From: mvashishtha Date: Mon, 13 Jun 2022 10:50:32 -0500 Subject: [PATCH 4/5] Try pinning ray in requirements-doc.txt as well. Signed-off-by: mvashishtha --- docs/requirements-doc.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/requirements-doc.txt b/docs/requirements-doc.txt index edd5f67a0a4..d280763910b 100644 --- a/docs/requirements-doc.txt +++ b/docs/requirements-doc.txt @@ -9,6 +9,10 @@ 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 xgboost From f820a7d1d777d51dc85415b9e49e1e88bb55bc1a Mon Sep 17 00:00:00 2001 From: mvashishtha Date: Mon, 13 Jun 2022 10:51:02 -0500 Subject: [PATCH 5/5] Delete whitespace. Signed-off-by: mvashishtha --- docs/requirements-doc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements-doc.txt b/docs/requirements-doc.txt index d280763910b..60eb5fe301b 100644 --- a/docs/requirements-doc.txt +++ b/docs/requirements-doc.txt @@ -10,9 +10,9 @@ 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. +# 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] +git+https://github.com/modin-project/modin.git@master#egg=modin[all] sphinxcontrib_plantuml sphinx-issues xgboost