Skip to content

Commit fecf786

Browse files
committed
Merge branch 'master' of https://github.com/ray-project/ray into eoakes/gcs-client
2 parents b0ac42a + 25bb624 commit fecf786

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1291
-116
lines changed

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,38 @@ repos:
4545
- id: ruff
4646
args: [ --select, "I", --fix, --exit-non-zero-on-fix ]
4747

48+
# pydoclint-local is for local commits only due to pre-commit-hook only passing
49+
# updated files to the hook and overwriting the baseline text file
4850
- repo: https://github.com/jsh9/pydoclint
4951
rev: "0.6.6"
5052
hooks:
5153
- id: pydoclint
54+
name: pydoclint-local
55+
stages: [pre-commit, pre-push]
56+
args: [
57+
--style=google,
58+
--baseline=ci/lint/pydoclint-baseline.txt,
59+
--exclude=thirdparty|^python/ray/serve/tests/test_config_files/syntax_error\.py$|^python/ray/_private/parameter\.py$,
60+
--auto-regenerate-baseline=False,
61+
# Current settings (not because we think they're right, but because we
62+
# don't want a baseline the size of the codebase)
63+
--arg-type-hints-in-docstring=False,
64+
--skip-checking-raises=True,
65+
--check-return-types=False,
66+
--allow-init-docstring=True,
67+
--check-class-attributes=False,
68+
# --check-style-mismatch=True, # Bring this back once things are a bit cleaner
69+
]
70+
types: [python]
71+
files: '^python/ray/'
72+
73+
# pydoclint-ci is for CI, overwrites the baseline text file, and is run with the manual stage flag
74+
- repo: https://github.com/jsh9/pydoclint
75+
rev: "0.6.6"
76+
hooks:
77+
- id: pydoclint
78+
name: pydoclint-ci
79+
stages: [manual]
5280
args: [
5381
--style=google,
5482
--baseline=ci/lint/pydoclint-baseline.txt,

WORKSPACE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ filegroup(
125125
visibility = ["//visibility:public"],
126126
)
127127
""",
128-
sha256 = "2c4392591fe9469d006452ef22f32712f35087d87fb1764ec03e23544eb8770d",
129-
urls = ["https://github.com/astral-sh/uv/releases/download/0.8.10/uv-x86_64-unknown-linux-gnu.tar.gz"],
128+
sha256 = "920cbcaad514cc185634f6f0dcd71df5e8f4ee4456d440a22e0f8c0f142a8203",
129+
urls = ["https://github.com/astral-sh/uv/releases/download/0.8.17/uv-x86_64-unknown-linux-gnu.tar.gz"],
130130
)
131131

132132
http_archive(
@@ -138,8 +138,8 @@ filegroup(
138138
visibility = ["//visibility:public"],
139139
)
140140
""",
141-
sha256 = "5200278ae00b5c0822a7db7a99376b2167e8e9391b29c3de22f9e4fdebc9c0e8",
142-
urls = ["https://github.com/astral-sh/uv/releases/download/0.8.10/uv-aarch64-apple-darwin.tar.gz"],
141+
sha256 = "e4d4859d7726298daa4c12e114f269ff282b2cfc2b415dc0b2ca44ae2dbd358e",
142+
urls = ["https://github.com/astral-sh/uv/releases/download/0.8.17/uv-aarch64-apple-darwin.tar.gz"],
143143
)
144144

145145
http_archive(

ci/lint/lint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ pre_commit() {
4848
pre_commit_pydoclint() {
4949
# Run pre-commit pydoclint on all files
5050
pip install -c python/requirements_compiled.txt pre-commit clang-format
51-
pre-commit run pydoclint --all-files --show-diff-on-failure
51+
pre-commit run pydoclint --hook-stage manual --all-files --show-diff-on-failure
52+
git diff --quiet -- ci/lint/pydoclint-baseline.txt || {
53+
echo "Baseline needs update. Run the CI-style hook: \"pre-commit run pydoclint --hook-stage manual --all-files --show-diff-on-failure\" locally and commit the baseline."
54+
exit 1
55+
}
5256
}
5357

5458
code_format() {

ci/raydepsets/pre_hooks/remove-compiled-headers.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22

33
set -euo pipefail
44

5-
PYTHON_CODE="$(python -c "import sys; v=sys.version_info; print(f'py{v.major}{v.minor}')")"
6-
if [[ "${PYTHON_CODE}" != "py311" ]]; then
7-
echo "--- Python version is not 3.11"
8-
echo "--- Current Python version: ${PYTHON_CODE}"
9-
exit 1
10-
fi
11-
125
mkdir -p /tmp/ray-deps
136

147
# Remove the GPU constraints

ci/raydepsets/tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_uv_version(self):
111111
stderr=subprocess.PIPE,
112112
)
113113
assert result.returncode == 0
114-
assert "uv 0.8.10" in result.stdout.decode("utf-8")
114+
assert "uv 0.8.17" in result.stdout.decode("utf-8")
115115
assert result.stderr.decode("utf-8") == ""
116116

117117
def test_compile(self):

doc/BUILD.bazel

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,41 @@ py_test(
202202
],
203203
)
204204

205+
py_test(
206+
name = "doc_code_direct_transport_gloo",
207+
size = "small",
208+
srcs = ["source/ray-core/doc_code/direct_transport_gloo.py"],
209+
main = "source/ray-core/doc_code/direct_transport_gloo.py",
210+
tags = [
211+
"exclusive",
212+
"team:core",
213+
],
214+
)
215+
216+
py_test(
217+
name = "doc_code_direct_transport_nccl",
218+
size = "small",
219+
srcs = ["source/ray-core/doc_code/direct_transport_nccl.py"],
220+
main = "source/ray-core/doc_code/direct_transport_nccl.py",
221+
tags = [
222+
"exclusive",
223+
"multi_gpu",
224+
"team:core",
225+
],
226+
)
227+
228+
py_test(
229+
name = "doc_code_direct_transport_nixl",
230+
size = "small",
231+
srcs = ["source/ray-core/doc_code/direct_transport_nixl.py"],
232+
main = "source/ray-core/doc_code/direct_transport_nixl.py",
233+
tags = [
234+
"exclusive",
235+
"multi_gpu",
236+
"team:core",
237+
],
238+
)
239+
205240
py_test_run_all_subdirectory(
206241
size = "medium",
207242
include = ["source/ray-core/doc_code/*.py"],
@@ -214,6 +249,8 @@ py_test_run_all_subdirectory(
214249
"source/ray-core/doc_code/cgraph_overlap.py",
215250
# not testing this as it purposefully segfaults
216251
"source/ray-core/doc_code/cgraph_troubleshooting.py",
252+
"source/ray-core/doc_code/direct_transport_nccl.py",
253+
"source/ray-core/doc_code/direct_transport_nixl.py",
217254
],
218255
extra_srcs = [],
219256
tags = [
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Ray Direct Transport (RDT) API
2+
==============================
3+
4+
Usage with Core APIs
5+
--------------------
6+
Enable RDT for actor tasks with the :func:`@ray.method <ray.method>` decorator, or pass `_tensor_transport` to :func:`ray.put`. You can then pass the resulting `ray.ObjectRef` to other actor tasks, or use :func:`ray.get` to retrieve the result. See :ref:`Ray Direct Transport (RDT) <direct-transport>` for more details on usage.
7+
8+
9+
.. autosummary::
10+
:nosignatures:
11+
:toctree: doc/
12+
13+
ray.method
14+
ray.put
15+
ray.get
16+
17+
Collective tensor transports
18+
----------------------------
19+
Collective tensor transports require a collective group to be created before RDT objects can be used. Use these methods to create and manage collective groups for the `gloo` and `nccl` tensor transports.
20+
21+
22+
.. autosummary::
23+
:nosignatures:
24+
:toctree: doc/
25+
26+
ray.experimental.collective.create_collective_group
27+
ray.experimental.collective.get_collective_groups
28+
ray.experimental.collective.destroy_collective_group

doc/source/ray-core/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ Ray Core API
1212
cli.rst
1313
../../ray-observability/reference/cli.rst
1414
../../ray-observability/reference/api.rst
15+
direct-transport.rst

0 commit comments

Comments
 (0)