Skip to content

Commit 7f7a493

Browse files
committed
update ray patch
1 parent 78ec091 commit 7f7a493

File tree

1 file changed

+155
-2
lines changed

1 file changed

+155
-2
lines changed

graalpython/lib-graalpython/patches/ray/ray-2.9.1.patch

Lines changed: 155 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,57 @@ index 1dfaaca..6eeb618 100644
4040
import grpc # noqa: F401
4141

4242
# Adding new modules should also be reflected in the
43+
diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt
44+
index f96158b..f584ac3 100644
45+
--- a/doc/requirements-doc.txt
46+
+++ b/doc/requirements-doc.txt
47+
@@ -1,6 +1,6 @@
48+
# Production requirements. This is what readthedocs.com picks up
49+
50+
-watchfiles==0.19.0 # Required because sphinx-click doesn't support mocking
51+
+# watchfiles==0.19.0 # Required because sphinx-click doesn't support mocking
52+
53+
# Syntax highlighting
54+
Pygments==2.16.1
55+
diff --git a/doc/source/conf.py b/doc/source/conf.py
56+
index 477c25d..6a6c2f4 100644
57+
--- a/doc/source/conf.py
58+
+++ b/doc/source/conf.py
59+
@@ -496,7 +496,7 @@ autodoc_mock_imports = [
60+
"tree",
61+
"uvicorn",
62+
"wandb",
63+
- "watchfiles",
64+
+ # "watchfiles",
65+
"xgboost",
66+
"xgboost_ray",
67+
"psutil",
68+
diff --git a/doc/source/ray-overview/pip_freeze_ray-ml-py39-cpu.txt b/doc/source/ray-overview/pip_freeze_ray-ml-py39-cpu.txt
69+
index ddcddd7..25492db 100644
70+
--- a/doc/source/ray-overview/pip_freeze_ray-ml-py39-cpu.txt
71+
+++ b/doc/source/ray-overview/pip_freeze_ray-ml-py39-cpu.txt
72+
@@ -459,7 +459,7 @@ uvicorn==0.22.0
73+
uvloop==0.19.0
74+
virtualenv==20.21.0
75+
wandb==0.13.4
76+
-watchfiles==0.19.0
77+
+# watchfiles==0.19.0
78+
wcwidth==0.2.12
79+
webcolors==1.13
80+
webencodings==0.5.1
81+
diff --git a/doc/source/ray-overview/pip_freeze_ray-py39-cpu.txt b/doc/source/ray-overview/pip_freeze_ray-py39-cpu.txt
82+
index 8f56dcb..e14a213 100644
83+
--- a/doc/source/ray-overview/pip_freeze_ray-py39-cpu.txt
84+
+++ b/doc/source/ray-overview/pip_freeze_ray-py39-cpu.txt
85+
@@ -154,7 +154,7 @@ urllib3 @ file:///croot/urllib3_1698257533958/work
86+
uvicorn==0.22.0
87+
uvloop==0.19.0
88+
virtualenv==20.21.0
89+
-watchfiles==0.19.0
90+
+# watchfiles==0.19.0
91+
wcwidth==0.2.12
92+
websockets==11.0.3
93+
yarl==1.9.3
4394
diff --git a/pyproject.toml b/pyproject.toml
4495
new file mode 100644
4596
index 0000000..d69f0ac
@@ -50,6 +101,28 @@ index 0000000..d69f0ac
50101
+requires = ["setuptools >= 40.6.0", "wheel", "pip", "psutil", "setproctitle==1.2.2", "colorama", "aiohttp"]
51102
+build-backend = "ray_build_backend"
52103
+backend-path = ["."]
104+
diff --git a/python/ray/_private/function_manager.py b/python/ray/_private/function_manager.py
105+
index bee0ae6..ee0e3ea 100644
106+
--- a/python/ray/_private/function_manager.py
107+
+++ b/python/ray/_private/function_manager.py
108+
@@ -266,7 +266,7 @@ class FunctionActorManager:
109+
"function_name": remote_function._function_name,
110+
"module": function.__module__,
111+
"function": pickled_function,
112+
- "collision_identifier": self.compute_collision_identifier(function),
113+
+ # "collision_identifier": self.compute_collision_identifier(function), # code object is missing attribute '_varname_from_oparg'
114+
"max_calls": remote_function._max_calls,
115+
}
116+
)
117+
@@ -524,7 +524,7 @@ class FunctionActorManager:
118+
"module": actor_creation_function_descriptor.module_name,
119+
"class": serialized_actor_class,
120+
"job_id": job_id.binary(),
121+
- "collision_identifier": self.compute_collision_identifier(Class),
122+
+ # "collision_identifier": self.compute_collision_identifier(Class), # code object is missing attribute '_varname_from_oparg'
123+
"actor_method_names": json.dumps(list(actor_method_names)),
124+
}
125+
53126
diff --git a/python/ray/_private/services.py b/python/ray/_private/services.py
54127
index 867b748..40b3fb2 100644
55128
--- a/python/ray/_private/services.py
@@ -80,11 +153,91 @@ index 9c67ec6..12fda5a 100644
80153

81154

82155
def _extract_class_dict(cls):
156+
diff --git a/python/ray/serve/scripts.py b/python/ray/serve/scripts.py
157+
index 630ab7a..e95bcd6 100644
158+
--- a/python/ray/serve/scripts.py
159+
+++ b/python/ray/serve/scripts.py
160+
@@ -9,7 +9,7 @@ from dataclasses import asdict
161+
from typing import Dict, List, Optional, Tuple
162+
163+
import click
164+
-import watchfiles
165+
+# import watchfiles
166+
import yaml
167+
168+
import ray
169+
diff --git a/python/requirements.txt b/python/requirements.txt
170+
index af77b05..f605240 100644
171+
--- a/python/requirements.txt
172+
+++ b/python/requirements.txt
173+
@@ -17,7 +17,7 @@ pyyaml
174+
aiosignal
175+
frozenlist
176+
requests
177+
-watchfiles
178+
+# watchfiles
179+
180+
# Python version-specific requirements
181+
grpcio == 1.54.2; sys_platform == "darwin"
182+
@@ -58,6 +58,7 @@ starlette
183+
typer
184+
fsspec
185+
pandas>=1.3
186+
-pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3 # Serve users can use pydantic<2
187+
+# pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3 # Serve users can use pydantic<2
188+
+pydantic==2.4.2
189+
py-spy>=0.2.0
190+
-watchfiles
191+
+# watchfiles
192+
diff --git a/python/requirements/test-requirements.txt b/python/requirements/test-requirements.txt
193+
index c87c1de..29d7c7f 100644
194+
--- a/python/requirements/test-requirements.txt
195+
+++ b/python/requirements/test-requirements.txt
196+
@@ -112,4 +112,4 @@ threadpoolctl==3.1.0
197+
numexpr==2.8.4
198+
199+
# For `serve run --reload` CLI.
200+
-watchfiles==0.19.0
201+
+# watchfiles==0.19.0
83202
diff --git a/python/setup.py b/python/setup.py
84-
index a34a39c..6ac7ac5 100644
203+
index a34a39c..51a1a17 100644
85204
--- a/python/setup.py
86205
+++ b/python/setup.py
87-
@@ -535,19 +535,19 @@ def build(build_python, build_java, build_cpp):
206+
@@ -251,7 +251,8 @@ if setup_spec.type == SetupType.RAY:
207+
"grpcio >= 1.32.0; python_version < '3.10'", # noqa:E501
208+
"grpcio >= 1.42.0; python_version >= '3.10'", # noqa:E501
209+
"opencensus",
210+
- "pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3",
211+
+ # "pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3",
212+
+ "pydantic",
213+
"prometheus_client >= 0.7.1",
214+
"smart_open",
215+
"virtualenv >=20.0.24, !=20.21.1", # For pip runtime env.
216+
@@ -264,12 +265,12 @@ if setup_spec.type == SetupType.RAY:
217+
else "grpcio",
218+
],
219+
"serve": [
220+
- "uvicorn[standard]",
221+
+ # "uvicorn[standard]", # needs watchfiles
222+
"requests",
223+
"starlette",
224+
"fastapi",
225+
"aiorwlock",
226+
- "watchfiles",
227+
+ # "watchfiles", # requires PyO3 patch (require embadding)
228+
],
229+
"tune": ["pandas", "tensorboardX>=1.9", "requests", pyarrow_dep, "fsspec"],
230+
"observability": [
231+
@@ -520,7 +521,7 @@ def build(build_python, build_java, build_cpp):
232+
# version of Python to build packages inside the build.sh script. Note
233+
# that certain flags will not be passed along such as --user or sudo.
234+
# TODO(rkn): Fix this.
235+
- if not os.getenv("SKIP_THIRDPARTY_INSTALL"):
236+
+ if not os.getenv("SKIP_THIRDPARTY_INSTALL") and False:
237+
pip_packages = ["psutil", "setproctitle==1.2.2", "colorama"]
238+
subprocess.check_call(
239+
[
240+
@@ -535,19 +536,19 @@ def build(build_python, build_java, build_cpp):
88241
env=dict(os.environ, CC="gcc"),
89242
)
90243

0 commit comments

Comments
 (0)