Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Optional features are installed as extras, for example `uv add "orcapod[spiraldb

| Extra | Adds |
|-------|------|
| `orcapod[ray]` | Distributed execution with `RayExecutor` |
| `orcapod[ray]` | Distributed execution with `RayExecutor` (Ray 2.60 or later, which has no wheel for Intel macOS) |
| `orcapod[redis]` | `RedisCacher`, a Redis-backed hash cache |
| `orcapod[postgresql]` | The PostgreSQL connector, table source and file hash cache (psycopg 3.1.17 or later) |
| `orcapod[spiraldb]` | The SpiralDB connector and table source |
Expand Down
21 changes: 20 additions & 1 deletion changelog.d/ITL-1210.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,23 @@
extras and development tools: anyio 4.14.2, certifi 2026.10.23, cryptography 50.0.2,
dnspython 2.9.2, filelock 4.2.11, h2 4.4.1, hpack 4.2.0, hydra-core 1.3.8, msgpack 1.2.4,
opentelemetry-api 1.45.2, pip 26.3, pyasn1 0.6.5, pyjwt 2.15.1, setuptools 84.2.1,
tornado 6.6.1, virtualenv 21.15.8. `pyproject.toml` is unchanged.
tornado 6.6.1, virtualenv 21.15.8. That update changes no requirement in `pyproject.toml`.
- The `ray` extra now requires `ray[default]>=2.60.0,<3`, no longer exactly `ray[default]==2.48.0`;
the dev group follows, and `uv.lock` holds ray 2.60.0 (ITL-1210). Since Ray 2.59, a local
`ray.init()` (no cluster address, which is what `RayExecutor` calls when you give it no
`ray_address`) turns on Ray's token authentication and writes a token to
`~/.ray/auth_token` if none exists. Set `RAY_AUTH_MODE=disabled` to opt out. Connecting to
a remote or multi-node cluster is unchanged.

### Known limitations

- The `ray` extra (and `all`, which includes it) cannot be installed on Intel macOS: Ray has
published no wheel for macOS x86_64 since 2.50 and publishes no source distribution. Linux
(x86_64 and aarch64), Apple silicon macOS and Windows have wheels for Python 3.11 to 3.13
(ITL-1210).
- With Ray 2.54 or later, a driver started with `uv run` from a project whose version comes
from version control (hatch-vcs or setuptools-scm, such as an Orcapod source checkout) hangs
on its first `RayExecutor` call: Ray rebuilds the project on its workers without `.git`, and
the workers never start. Set `RAY_ENABLE_UV_RUN_RUNTIME_ENV=0`, or start the driver with
`python`. See the troubleshooting page. A driver started with `python`, and a project with a
fixed version, are not affected (ITL-1210, ITL-1213).
27 changes: 27 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,33 @@ old results are returned.
default is `"v0.0"`, and a minor bump (`"v0.1"`) is not enough. Renaming the function also
works. See the tutorial, [Part 6](tutorial/06-reruns-and-caching.md).

### A job with `RayExecutor` hangs and its tasks never start

**Symptom.** With Ray 2.54 or later, a script started with `uv run` hangs on its first function
call through `RayExecutor`. No task ever runs and no error is raised. The Ray log (the raylet
output in the terminal) shows a failed build, ending with
`setuptools-scm was unable to detect version for .../working_dir_files/...`.

**Cause.** When the driver is started with `uv run`, Ray starts its workers through `uv run`
too: it uploads the working directory and installs the project there. Since Ray 2.54 the upload
leaves `.git` out. A project whose version comes from version control (hatch-vcs or
setuptools-scm, as an Orcapod source checkout's does) then cannot be installed on the workers,
so the workers never start. A driver started with `python`, or a project with a fixed version,
is not affected.

**Fix.** Turn off Ray's `uv run` propagation for the run:

```
RAY_ENABLE_UV_RUN_RUNTIME_ENV=0 uv run python my_pipeline.py
```

or start the driver with the environment's Python (`.venv/bin/python my_pipeline.py`). Ray then
sends neither the project nor `uv run` to the workers. On a local cluster the workers use the
driver's environment, as they did anyway. On a remote cluster (`RayExecutor(ray_address=...)`)
they use what is installed on the cluster, or the `runtime_env` given to `RayExecutor`: Orcapod
and what the pipeline imports must be there.
`RayExecutor` raising instead of hanging is ITL-1213.

### A node's table is empty

**Cause.** A job node shows the results of its current run, and it has none yet:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Issues = "https://github.com/metamorphic-labs/orcapod-python/issues"

[project.optional-dependencies]
redis = ["redis>=6.2.0"]
ray = ["ray[default]==2.48.0", "ipywidgets>=8.1.7"]
ray = ["ray[default]>=2.60.0,<3", "ipywidgets>=8.1.7"]
postgresql = ["psycopg[binary]>=3.1.17"]
spiraldb = [
"pyspiral>=0.16.33",
Expand Down Expand Up @@ -98,7 +98,7 @@ dev = [
"pytest-cov>=6.1.1",
"pytest-xdist>=3.6",
"psycopg[binary]>=3.1.17",
"ray[default]==2.48.0",
"ray[default]>=2.60.0,<3",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against PyPI and uv.lock; the finding is right for the extras and not a regression for the dev group.

  • The ray and all extras. Correct: Ray has published no macOS x86_64 wheel since 2.50 (2.48.0 and 2.49.x had one) and publishes no source distribution, so with ray[default]>=2.60.0,<3 these extras cannot be installed on Intel macOS. The requirement stays unconditional. The restriction is now stated in changelog.d/ITL-1210.md (Known limitations) and in the README's extras table (52ccae3).
  • The dev group. Not newly broken by this PR: on main the dev group already holds orcapod[torch], and the locked torch 2.15.0 has wheels for macOS arm64 and Windows only outside Linux, with no source distribution. A plain uv sync therefore already fails on Intel macOS before this change, so a platform marker on ray alone would not make the dev environment installable there.
  • Platforms covered. ray 2.60.0 in uv.lock has wheels for CPython 3.11 to 3.14 on manylinux2014_x86_64, manylinux2014_aarch64, macosx_12_0_arm64 and win_amd64. Every CI job runs on ubuntu-latest with Python 3.11, 3.12 or 3.13.

Posted by a Claude Code agent on behalf of @eywalker.

"redis>=6.2.0",
"ruff>=0.14.4",
"testcontainers[postgres]>=4.0.0",
Expand Down
8 changes: 8 additions & 0 deletions src/orcapod/core/executors/ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ class RayExecutor(PythonFunctionExecutorBase):
Note:
``ray`` is an optional dependency. Import errors surface at
construction time so callers get a clear message.

With Ray 2.54 or later, a driver started with ``uv run`` from a
project whose version comes from version control (such as an
Orcapod source checkout) hangs: Ray rebuilds the project on its
workers without ``.git``, and the workers never start. Set
``RAY_ENABLE_UV_RUN_RUNTIME_ENV=0`` or start the driver with
``python``. See "A job with ``RayExecutor`` hangs and its tasks
never start" in the troubleshooting page.
"""

SUPPORTED_TYPES: frozenset[str] = frozenset({PYTHON_FUNCTION.type_id})
Expand Down
38 changes: 20 additions & 18 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading