Skip to content

Commit 3e1dba8

Browse files
aslonnieharshit-anyscale
authored andcommitted
parent c4f0c24
author Lonnie Liu <[email protected]> 1762143156 -0800 committer harshit <[email protected]> 1762519796 +0000 parent c4f0c24 author Lonnie Liu <[email protected]> 1762143156 -0800 committer harshit <[email protected]> 1762519679 +0000 [wheel] stop uploading python 3.9 wheels on release (#58363) python 3.9 is now out of the support window all using python 3.12 wheel names for unit testing Signed-off-by: Lonnie Liu <[email protected]> [ci] stop verifying python 3.9 wheels (#58365) we will stop releasing them Signed-off-by: Lonnie Liu <[email protected]> [bazel] rename python runtime to py39 runtime (#58362) and move them into bazel dir. getting ready for python version upgrade Signed-off-by: Lonnie Liu <[email protected]> add template for async inf Signed-off-by: harshit <[email protected]> minor changes Signed-off-by: harshit <[email protected]> template for async inf Signed-off-by: harshit <[email protected]> fix tests Signed-off-by: harshit <[email protected]> fix tests Signed-off-by: harshit <[email protected]> fix tests Signed-off-by: harshit <[email protected]> fix tests Signed-off-by: harshit <[email protected]> fix tests Signed-off-by: harshit <[email protected]>
1 parent c4f0c24 commit 3e1dba8

File tree

24 files changed

+1395
-69
lines changed

24 files changed

+1395
-69
lines changed

.buildkite/release-automation/verify-macos-wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -x
77
# TODO(#54047): Python 3.13 is skipped due to the bug
88
# we should re-enable it when the bug is fixed.
99

10-
PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12")
10+
PYTHON_VERSIONS=("3.10" "3.11" "3.12")
1111
BAZELISK_VERSION="v1.16.0"
1212

1313
export USE_BAZEL_VERSION="${USE_BAZEL_VERSION:-6.5.0}"

.buildkite/release-automation/wheels.rayci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ steps:
3535
- export RAY_COMMIT="$RAY_COMMIT"
3636
- bash -i .buildkite/release-automation/verify-linux-wheels.sh
3737
matrix:
38-
- "3.9"
3938
- "3.10"
4039
- "3.11"
4140
- "3.12"
@@ -58,7 +57,6 @@ steps:
5857
- export RAY_COMMIT="$RAY_COMMIT"
5958
- bash -i .buildkite/release-automation/verify-linux-wheels.sh
6059
matrix:
61-
- "3.9"
6260
- "3.10"
6361
- "3.11"
6462
- "3.12"

BUILD.bazel

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
1010
load("@com_github_grpc_grpc//bazel:cython_library.bzl", "pyx_library")
1111
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
12-
load("@python3_9//:defs.bzl", python39 = "interpreter")
1312
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
1413
load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files")
1514
load("@rules_pkg//pkg:zip.bzl", "pkg_zip")
1615
load("@rules_proto//proto:defs.bzl", "proto_library")
17-
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_runtime", "py_runtime_pair")
16+
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
1817
load("//bazel:ray.bzl", "COPTS", "PYX_COPTS", "PYX_SRCS", "ray_cc_library")
1918

2019
package(
@@ -23,34 +22,13 @@ package(
2322

2423
# Hermetic python environment, currently only used for CI infra and scripts.
2524

26-
py_runtime(
27-
name = "python3_runtime",
28-
interpreter = python39,
29-
python_version = "PY3",
30-
visibility = ["//visibility:private"],
31-
)
32-
33-
py_runtime_pair(
34-
name = "python_runtime_pair",
35-
py2_runtime = None,
36-
py3_runtime = ":python3_runtime",
37-
visibility = ["//visibility:private"],
38-
)
39-
4025
constraint_setting(name = "hermetic")
4126

4227
constraint_value(
4328
name = "hermetic_python",
4429
constraint_setting = ":hermetic",
4530
)
4631

47-
toolchain(
48-
name = "python_toolchain",
49-
exec_compatible_with = [":hermetic_python"],
50-
toolchain = ":python_runtime_pair",
51-
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
52-
)
53-
5432
platform(
5533
name = "hermetic_python_platform",
5634
constraint_values = [":hermetic_python"],

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ load("@py_deps_buildkite//:requirements.bzl", install_py_deps_buildkite = "insta
8383

8484
install_py_deps_buildkite()
8585

86-
register_toolchains("//:python_toolchain")
86+
register_toolchains("//bazel:py39_toolchain")
8787

8888
register_execution_platforms(
8989
"@local_config_platform//:host",

bazel/BUILD.bazel

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
load("@python3_9//:defs.bzl", python39 = "interpreter")
12
load("@py_deps_buildkite//:requirements.bzl", ci_require = "requirement")
2-
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
3+
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_runtime", "py_runtime_pair")
34

45
exports_files([
56
"pytest_wrapper.py",
@@ -60,3 +61,24 @@ config_setting(
6061
"@platforms//cpu:x86_64",
6162
],
6263
)
64+
65+
py_runtime(
66+
name = "py39_runtime",
67+
interpreter = python39,
68+
python_version = "PY3",
69+
visibility = ["//visibility:private"],
70+
)
71+
72+
py_runtime_pair(
73+
name = "py39_runtime_pair",
74+
py2_runtime = None,
75+
py3_runtime = ":py39_runtime",
76+
visibility = ["//visibility:private"],
77+
)
78+
79+
toolchain(
80+
name = "py39_toolchain",
81+
exec_compatible_with = ["//:hermetic_python"],
82+
toolchain = ":py39_runtime_pair",
83+
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
84+
)

ci/ray_ci/automation/ray_wheels_lib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
bazel_workspace_dir = os.environ.get("BUILD_WORKSPACE_DIRECTORY", "")
99

1010
PYTHON_VERSIONS = [
11-
"cp39-cp39",
1211
"cp310-cp310",
1312
"cp311-cp311",
1413
"cp312-cp312",

ci/ray_ci/automation/test_ray_wheels_lib.py

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
download_wheel_from_s3,
1919
)
2020

21-
SAMPLE_WHEELS = [
22-
"ray-1.0.0-cp39-cp39-manylinux2014_x86_64",
23-
"ray-1.0.0-cp39-cp39-manylinux2014_aarch64",
24-
"ray-1.0.0-cp39-cp39-macosx_12_0_arm64",
25-
"ray-1.0.0-cp39-cp39-win_amd64",
21+
_SAMPLE_WHEELS = [
22+
"ray-1.0.0-cp312-cp312-manylinux2014_x86_64",
23+
"ray-1.0.0-cp312-cp312-manylinux2014_aarch64",
24+
"ray-1.0.0-cp312-cp312-macosx_12_0_arm64",
25+
"ray-1.0.0-cp312-cp312-win_amd64",
2626
]
2727

2828

@@ -55,10 +55,10 @@ def test_get_wheel_names():
5555
def test_check_downloaded_wheels():
5656
with tempfile.TemporaryDirectory() as tmp_dir:
5757
wheels = [
58-
"ray-1.0.0-cp39-cp39-manylinux2014_x86_64",
59-
"ray-1.0.0-cp39-cp39-manylinux2014_aarch64",
60-
"ray-1.0.0-cp39-cp39-macosx_12_0_arm64",
61-
"ray-1.0.0-cp39-cp39-win_amd64",
58+
"ray-1.0.0-cp312-cp312-manylinux2014_x86_64",
59+
"ray-1.0.0-cp312-cp312-manylinux2014_aarch64",
60+
"ray-1.0.0-cp312-cp312-macosx_12_0_arm64",
61+
"ray-1.0.0-cp312-cp312-win_amd64",
6262
]
6363

6464
for wheel in wheels:
@@ -71,10 +71,10 @@ def test_check_downloaded_wheels():
7171
def test_check_downloaded_wheels_fail():
7272
with tempfile.TemporaryDirectory() as tmp_dir:
7373
wheels = [
74-
"ray-1.0.0-cp39-cp39-manylinux2014_x86_64",
75-
"ray-1.0.0-cp39-cp39-manylinux2014_aarch64",
76-
"ray-1.0.0-cp39-cp39-macosx_12_0_arm64",
77-
"ray-1.0.0-cp39-cp39-win_amd64",
74+
"ray-1.0.0-cp312-cp312-manylinux2014_x86_64",
75+
"ray-1.0.0-cp312-cp312-manylinux2014_aarch64",
76+
"ray-1.0.0-cp312-cp312-macosx_12_0_arm64",
77+
"ray-1.0.0-cp312-cp312-win_amd64",
7878
]
7979

8080
for wheel in wheels[:3]:
@@ -89,10 +89,10 @@ def test_check_downloaded_wheels_fail():
8989
def test_download_wheel_from_s3(mock_boto3_client):
9090
with tempfile.TemporaryDirectory() as tmp_dir:
9191
keys = [
92-
"releases/1.0.0/1234567/ray-1.0.0-cp39-cp39-manylinux2014_x86_64.whl",
93-
"releases/1.0.0/1234567/ray-1.0.0-cp39-cp39-manylinux2014_aarch64.whl",
94-
"releases/1.0.0/1234567/ray-1.0.0-cp39-cp39-macosx_12_0_arm64.whl",
95-
"releases/1.0.0/1234567/ray-1.0.0-cp39-cp39-win_amd64.whl",
92+
"releases/1.0.0/1234567/ray-1.0.0-cp312-cp312-manylinux2014_x86_64.whl",
93+
"releases/1.0.0/1234567/ray-1.0.0-cp312-cp312-manylinux2014_aarch64.whl",
94+
"releases/1.0.0/1234567/ray-1.0.0-cp312-cp312-macosx_12_0_arm64.whl",
95+
"releases/1.0.0/1234567/ray-1.0.0-cp312-cp312-win_amd64.whl",
9696
]
9797
for key in keys:
9898
download_wheel_from_s3(key=key, directory_path=tmp_dir)
@@ -115,8 +115,8 @@ def test_download_wheel_from_s3_fail(mock_boto3_client):
115115

116116
with tempfile.TemporaryDirectory() as tmp_dir:
117117
keys = [
118-
"releases/1.0.0/1234567/ray-1.0.0-cp39-cp39-manylinux2014_x86_64.whl",
119-
"releases/1.0.0/1234567/ray-1.0.0-cp39-cp39-manylinux2014_aarch64.whl",
118+
"releases/1.0.0/1234567/ray-1.0.0-cp312-cp312-manylinux2014_x86_64.whl",
119+
"releases/1.0.0/1234567/ray-1.0.0-cp312-cp312-manylinux2014_aarch64.whl",
120120
]
121121
for key in keys:
122122
with pytest.raises(ClientError, match="Not Found"):
@@ -132,7 +132,7 @@ def test_download_ray_wheels_from_s3(
132132
commit_hash = "1234567"
133133
ray_version = "1.0.0"
134134

135-
mock_get_wheel_names.return_value = SAMPLE_WHEELS
135+
mock_get_wheel_names.return_value = _SAMPLE_WHEELS
136136

137137
with tempfile.TemporaryDirectory() as tmp_dir:
138138
download_ray_wheels_from_s3(
@@ -142,15 +142,15 @@ def test_download_ray_wheels_from_s3(
142142
)
143143

144144
mock_get_wheel_names.assert_called_with(ray_version=ray_version)
145-
assert mock_download_wheel.call_count == len(SAMPLE_WHEELS)
145+
assert mock_download_wheel.call_count == len(_SAMPLE_WHEELS)
146146
for i, call_args in enumerate(mock_download_wheel.call_args_list):
147147
assert (
148148
call_args[0][0]
149-
== f"releases/{ray_version}/{commit_hash}/{SAMPLE_WHEELS[i]}.whl"
149+
== f"releases/{ray_version}/{commit_hash}/{_SAMPLE_WHEELS[i]}.whl"
150150
)
151151
assert call_args[0][1] == tmp_dir
152152

153-
mock_check_wheels.assert_called_with(tmp_dir, SAMPLE_WHEELS)
153+
mock_check_wheels.assert_called_with(tmp_dir, _SAMPLE_WHEELS)
154154

155155

156156
@mock.patch("ci.ray_ci.automation.ray_wheels_lib.download_wheel_from_s3")
@@ -162,7 +162,7 @@ def test_download_ray_wheels_from_s3_with_branch(
162162
commit_hash = "1234567"
163163
ray_version = "1.0.0"
164164

165-
mock_get_wheel_names.return_value = SAMPLE_WHEELS
165+
mock_get_wheel_names.return_value = _SAMPLE_WHEELS
166166

167167
with tempfile.TemporaryDirectory() as tmp_dir:
168168
download_ray_wheels_from_s3(
@@ -173,14 +173,15 @@ def test_download_ray_wheels_from_s3_with_branch(
173173
)
174174

175175
mock_get_wheel_names.assert_called_with(ray_version=ray_version)
176-
assert mock_download_wheel.call_count == len(SAMPLE_WHEELS)
176+
assert mock_download_wheel.call_count == len(_SAMPLE_WHEELS)
177177
for i, call_args in enumerate(mock_download_wheel.call_args_list):
178178
assert (
179-
call_args[0][0] == f"custom_branch/{commit_hash}/{SAMPLE_WHEELS[i]}.whl"
179+
call_args[0][0]
180+
== f"custom_branch/{commit_hash}/{_SAMPLE_WHEELS[i]}.whl"
180181
)
181182
assert call_args[0][1] == tmp_dir
182183

183-
mock_check_wheels.assert_called_with(tmp_dir, SAMPLE_WHEELS)
184+
mock_check_wheels.assert_called_with(tmp_dir, _SAMPLE_WHEELS)
184185

185186

186187
@mock.patch("ci.ray_ci.automation.ray_wheels_lib.download_wheel_from_s3")
@@ -192,7 +193,7 @@ def test_download_ray_wheels_from_s3_partial_platform(
192193
commit_hash = "1234567"
193194
ray_version = "1.1.0"
194195

195-
mock_get_wheel_names.return_value = SAMPLE_WHEELS
196+
mock_get_wheel_names.return_value = _SAMPLE_WHEELS
196197

197198
with tempfile.TemporaryDirectory() as tmp_dir:
198199
download_ray_wheels_from_s3(
@@ -202,15 +203,15 @@ def test_download_ray_wheels_from_s3_partial_platform(
202203
)
203204

204205
mock_get_wheel_names.assert_called_with(ray_version=ray_version)
205-
assert mock_download_wheel.call_count == len(SAMPLE_WHEELS)
206+
assert mock_download_wheel.call_count == len(_SAMPLE_WHEELS)
206207
for i, call_args in enumerate(mock_download_wheel.call_args_list):
207208
assert (
208209
call_args[0][0]
209-
== f"releases/{ray_version}/{commit_hash}/{SAMPLE_WHEELS[i]}.whl"
210+
== f"releases/{ray_version}/{commit_hash}/{_SAMPLE_WHEELS[i]}.whl"
210211
)
211212
assert call_args[0][1] == tmp_dir
212213

213-
mock_check_wheels.assert_called_with(tmp_dir, SAMPLE_WHEELS)
214+
mock_check_wheels.assert_called_with(tmp_dir, _SAMPLE_WHEELS)
214215

215216

216217
@mock.patch("ci.ray_ci.automation.ray_wheels_lib.download_wheel_from_s3")
@@ -222,15 +223,15 @@ def test_download_ray_wheels_from_s3_fail_check_wheels(
222223
commit_hash = "1234567"
223224
ray_version = "1.0.0"
224225

225-
mock_get_wheel_names.return_value = SAMPLE_WHEELS
226+
mock_get_wheel_names.return_value = _SAMPLE_WHEELS
226227
mock_check_wheels.side_effect = AssertionError()
227228

228229
with tempfile.TemporaryDirectory() as tmp_dir:
229230
with pytest.raises(AssertionError):
230231
download_ray_wheels_from_s3(
231232
commit_hash=commit_hash, ray_version=ray_version, directory_path=tmp_dir
232233
)
233-
assert mock_download_wheel.call_count == len(SAMPLE_WHEELS)
234+
assert mock_download_wheel.call_count == len(_SAMPLE_WHEELS)
234235

235236

236237
@mock.patch("ci.ray_ci.automation.ray_wheels_lib.download_wheel_from_s3")
@@ -242,7 +243,7 @@ def test_download_ray_wheels_from_s3_fail_download(
242243
commit_hash = "1234567"
243244
ray_version = "1.0.0"
244245

245-
mock_get_wheel_names.return_value = SAMPLE_WHEELS
246+
mock_get_wheel_names.return_value = _SAMPLE_WHEELS
246247
mock_download_wheel.side_effect = ClientError(
247248
{
248249
"Error": {
@@ -263,31 +264,31 @@ def test_download_ray_wheels_from_s3_fail_download(
263264

264265
def test_add_build_tag_to_wheel():
265266
with tempfile.TemporaryDirectory() as tmp_dir:
266-
wheel_name = "ray-1.0.0-cp39-cp39-manylinux2014_x86_64.whl"
267+
wheel_name = "ray-1.0.0-cp312-cp312-manylinux2014_x86_64.whl"
267268
wheel_path = os.path.join(tmp_dir, wheel_name)
268269
with open(wheel_path, "w") as f:
269270
f.write("")
270271
add_build_tag_to_wheel(wheel_path=wheel_path, build_tag="123")
271-
expected_wheel_name = "ray-1.0.0-123-cp39-cp39-manylinux2014_x86_64.whl"
272+
expected_wheel_name = "ray-1.0.0-123-cp312-cp312-manylinux2014_x86_64.whl"
272273
expected_wheel_path = os.path.join(tmp_dir, expected_wheel_name)
273274
assert os.path.exists(expected_wheel_path)
274275

275276

276277
def test_add_build_tag_to_wheels():
277278
with tempfile.TemporaryDirectory() as tmp_dir:
278279
wheels = [
279-
"ray-1.0.0-cp39-cp39-manylinux2014_x86_64.whl",
280-
"ray-1.0.0-cp39-cp39-manylinux2014_aarch64.whl",
280+
"ray-1.0.0-cp312-cp312-manylinux2014_x86_64.whl",
281+
"ray-1.0.0-cp312-cp312-manylinux2014_aarch64.whl",
281282
]
282283
for wheel in wheels:
283284
with open(os.path.join(tmp_dir, wheel), "w") as f:
284285
f.write("")
285286
add_build_tag_to_wheels(directory_path=tmp_dir, build_tag="123")
286287
assert os.path.exists(
287-
os.path.join(tmp_dir, "ray-1.0.0-123-cp39-cp39-manylinux2014_x86_64.whl")
288+
os.path.join(tmp_dir, "ray-1.0.0-123-cp312-cp312-manylinux2014_x86_64.whl")
288289
)
289290
assert os.path.exists(
290-
os.path.join(tmp_dir, "ray-1.0.0-123-cp39-cp39-manylinux2014_aarch64.whl")
291+
os.path.join(tmp_dir, "ray-1.0.0-123-cp312-cp312-manylinux2014_aarch64.whl")
291292
)
292293

293294

doc/BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,3 +696,9 @@ filegroup(
696696
srcs = glob(["source/serve/tutorials/deployment-serve-llm/**/*.yaml"]),
697697
visibility = ["//release:__pkg__"],
698698
)
699+
700+
filegroup(
701+
name = "asynchronous_inference_example_configs",
702+
srcs = glob(["source/serve/tutorials/asynchronous-inference/**/*.yaml"]),
703+
visibility = ["//release:__pkg__"],
704+
)

doc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ def __init__(self, version: str):
234234
"serve/tutorials/deployment-serve-llm/*/notebook.ipynb",
235235
"ray-overview/examples/llamafactory-llm-fine-tune/README.ipynb",
236236
"ray-overview/examples/llamafactory-llm-fine-tune/**/*.ipynb",
237+
"serve/tutorials/asynchronous-inference/content/asynchronous-inference.ipynb",
237238
] + autogen_files
238239

239240
# If "DOC_LIB" is found, only build that top-level navigation item.

doc/source/serve/examples.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,9 @@ examples:
149149
skill_level: advanced
150150
link: tutorials/java
151151
related_technology: integrations
152+
- title: Asynchronous Inference using Ray Serve
153+
skill_level: beginner
154+
use_cases:
155+
- generative ai
156+
link: tutorials/asynchronous-inference/content/README
157+
related_technology: integrations

0 commit comments

Comments
 (0)