Fix uv_runtime_env_hook.py to pin worker Python version#59768
Fix uv_runtime_env_hook.py to pin worker Python version#59768edoakes merged 3 commits intoray-project:masterfrom
uv_runtime_env_hook.py to pin worker Python version#59768Conversation
There was a problem hiding this comment.
Code Review
This pull request addresses a potential Python version mismatch between the Ray driver and workers when using uv run. The fix correctly pins the worker's Python version by adding the --python argument to the uv run command. The logic for determining the Python version to use is sound, with a clear order of precedence that prioritizes user-specified settings and falls back to the driver's Python version. This effectively prevents version conflicts and related crashes. My review includes one minor suggestion to use a more idiomatic and slightly more performant way to extend a list in Python.
|
@dlwh please sign off the commits to fix DCO check |
… run`. This change ensures compatibility between the Ray driver and the worker by specifying the Python version, preventing version mismatches. Related issue: ray-project#59639. Signed-off-by: David Hall <david.hall@openathena.ai>
90a9d0d to
b0fa438
Compare
|
done sorry! |
Signed-off-by: David Hall <david.hall@openathena.ai>
|
Looks like |
af98368 to
4be663a
Compare
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
…t#59768) ## Description Fix `uv_runtime_env_hook.py` to pin worker Python version to driver version. If the system python version is different from the driver python version, you can end up with a mismatch between python versions (e.g. driver 3.11 vs worker 3.12), which causes Ray to deliberately crash elsewhere. This change ensures compatibility between the Ray driver and the worker by specifying the Python version, preventing version mismatches. ## Related issues Fixes ray-project#59639. ## Additional information --------- Signed-off-by: David Hall <david.hall@openathena.ai> Signed-off-by: jinbum-kim <jinbum9958@gmail.com>
…t#59768) ## Description Fix `uv_runtime_env_hook.py` to pin worker Python version to driver version. If the system python version is different from the driver python version, you can end up with a mismatch between python versions (e.g. driver 3.11 vs worker 3.12), which causes Ray to deliberately crash elsewhere. This change ensures compatibility between the Ray driver and the worker by specifying the Python version, preventing version mismatches. ## Related issues Fixes ray-project#59639. ## Additional information --------- Signed-off-by: David Hall <david.hall@openathena.ai> Signed-off-by: 400Ping <jiekaichang@apache.org>
…t#59768) ## Description Fix `uv_runtime_env_hook.py` to pin worker Python version to driver version. If the system python version is different from the driver python version, you can end up with a mismatch between python versions (e.g. driver 3.11 vs worker 3.12), which causes Ray to deliberately crash elsewhere. This change ensures compatibility between the Ray driver and the worker by specifying the Python version, preventing version mismatches. ## Related issues Fixes ray-project#59639. ## Additional information --------- Signed-off-by: David Hall <david.hall@openathena.ai>
…t#59768) ## Description Fix `uv_runtime_env_hook.py` to pin worker Python version to driver version. If the system python version is different from the driver python version, you can end up with a mismatch between python versions (e.g. driver 3.11 vs worker 3.12), which causes Ray to deliberately crash elsewhere. This change ensures compatibility between the Ray driver and the worker by specifying the Python version, preventing version mismatches. ## Related issues Fixes ray-project#59639. ## Additional information --------- Signed-off-by: David Hall <david.hall@openathena.ai> Signed-off-by: peterxcli <peterxcli@gmail.com>
…t#59768) ## Description Fix `uv_runtime_env_hook.py` to pin worker Python version to driver version. If the system python version is different from the driver python version, you can end up with a mismatch between python versions (e.g. driver 3.11 vs worker 3.12), which causes Ray to deliberately crash elsewhere. This change ensures compatibility between the Ray driver and the worker by specifying the Python version, preventing version mismatches. ## Related issues Fixes ray-project#59639. ## Additional information --------- Signed-off-by: David Hall <david.hall@openathena.ai> Signed-off-by: peterxcli <peterxcli@gmail.com>
Description
Fix
uv_runtime_env_hook.pyto pin worker Python version to driver version.If the system python version is different from the driver python version, you can end up with a mismatch between python versions (e.g. driver 3.11 vs worker 3.12), which causes Ray to deliberately crash elsewhere.
This change ensures compatibility between the Ray driver and the worker by specifying the Python version, preventing version mismatches.
Related issues
Fixes #59639.
Additional information