UV run curator

Open
#1,211 0 comments 0 reactions 1 assignee View on GitHub

@suiyoubi is already working on this.

Since Mar 12, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement

Describe the bug

There are 3 ways to run curator scripts, and all three are pretty different from each other. We should standardize on how to run:

  1. python quickstart.py : This is basic standard method. This does not copy any source code to ray runtime env.

File sizes

du -h --max-depth=1 /tmp/ray/session_2025-10-30_09-23-45_123558_3389566
4.0K    /tmp/ray/session_2025-10-30_09-23-45_123558_3389566/sockets
28K     /tmp/ray/session_2025-10-30_09-23-45_123558_3389566/runtime_resources
912K    /tmp/ray/session_2025-10-30_09-23-45_123558_3389566/metrics
940K    /tmp/ray/session_2025-10-30_09-23-45_123558_3389566/logs
1.9M    /tmp/ray/session_2025-10-30_09-23-45_123558_3389566
  1. uv run quickstart.py: This seems to be the preferred method for running with uv by ray but this copies the code over to ray runtime and also recompiles the code. This is what we use in our tests right now.

Logs:

2025-10-30 10:21:06,442 INFO packaging.py:588 -- Creating a file package for local module '/home/abhgarg/code/cursor/NeMo-Curator-Public-Main'.
2025-10-30 10:21:06,648 WARNING packaging.py:430 -- File /home/abhgarg/code/cursor/NeMo-Curator-Public-Main/.git/objects/pack/pack-a179c113e841db86a25a21138e139d30955825d3.pack is very large (331.44MiB). Consider adding this file to the 'excludes' list to skip uploading it: `ray.init(..., runtime_env={'excludes': ['/home/abhgarg/code/cursor/NeMo-Curator-Public-Main/.git/objects/pack/pack-a179c113e841db86a25a21138e139d30955825d3.pack']})`
2025-10-30 10:21:06,914 WARNING packaging.py:430 -- File /home/abhgarg/code/cursor/NeMo-Curator-Public-Main/.git/objects/pack/pack-30c5d0e45705209c3e3ce21d3c4ef41e3617ceb1.pack is very large (16.85MiB). Consider adding this file to the 'excludes' list to skip uploading it: `ray.init(..., runtime_env={'excludes': ['/home/abhgarg/code/cursor/NeMo-Curator-Public-Main/.git/objects/pack/pack-30c5d0e45705209c3e3ce21d3c4ef41e3617ceb1.pack']})`
2025-10-30 10:21:07,400 INFO packaging.py:380 -- Pushing file package 'gcs://_ray_pkg_6d4682d509a22604.zip' (375.29MiB) to Ray cluster...
2025-10-30 10:21:08,412 INFO packaging.py:393 -- Successfully pushed file package 'gcs://_ray_pkg_6d4682d509a22604.zip'.

...................

(raylet) warning: `VIRTUAL_ENV=/home/abhgarg/code/cursor/NeMo-Curator-Public-Main/.venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
(raylet) Using CPython 3.12.9 interpreter at: /home/abhgarg/miniconda3/envs/ray_curator/bin/python3
(raylet) Creating virtual environment at: .venv
(raylet)    Building nemo-curator @ file:///tmp/ray/session_2025-10-30_10-20-51_692805_3894115/runtime_resources/working_dir_files/_ray_pkg_6d4682d509a22604
(raylet) Downloading nvidia-cublas-cu12 (566.8MiB)
(raylet)       Built nemo-curator @ file:///tmp/ray/session_2025-10-30_10-20-51_692805_3894115/runtime_resources/working_dir_files/_ray_pkg_6d4682d509a22604
(raylet) [2025-10-30 10:21:14,268 E 3894849 3894873] (raylet) file_system_monitor.cc:116: /tmp/ray/session_2025-10-30_10-20-51_692805_3894115 is over 95% full, available space: 28.7053 GB; capacity: 1744.57 GB. Object creation will fail if spilling is required.
(raylet)  Downloading nvidia-nvjitlink-cu12 [repeated 16x across cluster] (Ray deduplicates logs by default. Set RAY_DEDUP_LOGS=0 to disable log deduplication, or see https://docs.ray.io/en/master/ray-observability/user-guides/configure-logging.html#log-deduplication for more options.)
(raylet) [2025-10-30 10:21:24,274 E 3894849 3894873] (raylet) file_system_monitor.cc:116: /tmp/ray/session_2025-10-30_10-20-51_692805_3894115 is over 95% full, available space: 27.0371 GB; capacity: 1744.57 GB. Object creation will fail if spilling is required.
(raylet)  Downloading nvidia-cublas-cu12
(raylet)  Downloading nvidia-cusparselt-cu12 [repeated 2x across cluster]
(raylet) [2025-10-30 10:21:34,279 E 3894849 3894873] (raylet) file_system_monitor.cc:116: /tmp/ray/session_2025-10-30_10-20-51_692805_3894115 is over 95% full, available space: 25.5348 GB; capacity: 1744.57 GB. Object creation will fail if spilling is required.
(raylet) Installed 194 packages in 119ms

File sizes

du -h --max-depth=1 /tmp/ray/session_2025-10-30_09-22-41_507654_3379911
4.0K    /tmp/ray/session_2025-10-30_09-22-41_507654_3379911/sockets
7.7G    /tmp/ray/session_2025-10-30_09-22-41_507654_3379911/runtime_resources
808K    /tmp/ray/session_2025-10-30_09-22-41_507654_3379911/metrics
568K    /tmp/ray/session_2025-10-30_09-22-41_507654_3379911/logs
7.7G    /tmp/ray/session_2025-10-30_09-22-41_507654_3379911
  1. uv run --active quickstart.py: This runs uv but does not rebuild the venv.
    Logs: Same as above except the venv installation

Sizes:

du -h --max-depth=1 /tmp/ray/session_2025-10-30_09-37-45_137691_3478221
4.0K    /tmp/ray/session_2025-10-30_09-37-45_137691_3478221/sockets
385M    /tmp/ray/session_2025-10-30_09-37-45_137691_3478221/runtime_resources
808K    /tmp/ray/session_2025-10-30_09-37-45_137691_3478221/metrics
976K    /tmp/ray/session_2025-10-30_09-37-45_137691_3478221/logs
387M    /tmp/ray/session_2025-10-30_09-37-45_137691_3478221

Currently, the 2nd method (What we use for our tests) would fail on any GPU machine since we do not install pynvml in our default deps. and xenna would fail saying no GPUs.

Note: In my experiments, export RAY_RUNTIME_ENV_HOOK=ray._private.runtime_env.uv_runtime_env_hook.hook had NO effects on the outputs.
Steps/Code to reproduce bug

Please see above

Expected behavior

See above

Additional context

See above

Dominant language
Python
Stars
1.8k
Forks
328
Avg merge
4d 5h
Merged PRs (30d)
30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA-NeMo/Curator

All issues in NVIDIA-NeMo/Curator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.