Skip to content

[fix] (code_gen): use runtime_env py_executable for Ray workers#913

Merged
bxyu-nvidia merged 3 commits intoNVIDIA-NeMo:mainfrom
spacegoing:fix_lcb_ray
Mar 20, 2026
Merged

[fix] (code_gen): use runtime_env py_executable for Ray workers#913
bxyu-nvidia merged 3 commits intoNVIDIA-NeMo:mainfrom
spacegoing:fix_lcb_ray

Conversation

@spacegoing
Copy link
Copy Markdown
Contributor

check_correctness_remote was decorated with @ray.remote without
runtime_env, so Ray workers spawned on system Python could not import
lcb_integration. The workaround was a symlink from the server's venv
into /usr/local/lib/python3.12/dist-packages/.

Fix: add runtime_env={"py_executable": sys.executable} to the
decorator, consistent with the pattern already used in swe_agents,
mini_swe_agent, and harbor_agent.

This ensures Ray workers inherit the code_gen server's venv and can
import lcb_integration directly, with no system path side effects.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Mar 19, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@bxyu-nvidia
Copy link
Copy Markdown
Contributor

PR looks great, can you please help to resolve the failing DCO please?

Signed-off-by: spacegoing <spacegoing@gmail.com>
Signed-off-by: spacegoing <spacegoing@gmail.com>
@spacegoing
Copy link
Copy Markdown
Contributor Author

@bxyu-nvidia DCO fixed.

@bxyu-nvidia
Copy link
Copy Markdown
Contributor

Sorry I should have kicked off the linting job earlier so you didn't have to do 2 rounds of iterations 🤦 can you pls do the pre-commit steps here to fix the linting https://github.com/NVIDIA-NeMo/Gym?tab=contributing-ov-file#development-setup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: spacegoing <spacegoing@gmail.com>
@spacegoing
Copy link
Copy Markdown
Contributor Author

@bxyu-nvidia no worries, lint fixed and pushed again

@bxyu-nvidia bxyu-nvidia merged commit 5a48f1b into NVIDIA-NeMo:main Mar 20, 2026
5 checks passed
MahanFathi pushed a commit that referenced this pull request Mar 24, 2026
`check_correctness_remote` was decorated with `@ray.remote` without
`runtime_env`, so Ray workers spawned on system Python could not import
  `lcb_integration`. The workaround was a symlink from the server's venv
  into `/usr/local/lib/python3.12/dist-packages/`.

  Fix: add `runtime_env={"py_executable": sys.executable}` to the
  decorator, consistent with the pattern already used in `swe_agents`,
  `mini_swe_agent`, and `harbor_agent`.

  This ensures Ray workers inherit the code_gen server's venv and can
  import `lcb_integration` directly, with no system path side effects.

---------

Signed-off-by: spacegoing <spacegoing@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jsw-zorro pushed a commit to niletron/Gym that referenced this pull request Apr 7, 2026
…IA-NeMo#913)

`check_correctness_remote` was decorated with `@ray.remote` without
`runtime_env`, so Ray workers spawned on system Python could not import
  `lcb_integration`. The workaround was a symlink from the server's venv
  into `/usr/local/lib/python3.12/dist-packages/`.

  Fix: add `runtime_env={"py_executable": sys.executable}` to the
  decorator, consistent with the pattern already used in `swe_agents`,
  `mini_swe_agent`, and `harbor_agent`.

  This ensures Ray workers inherit the code_gen server's venv and can
  import `lcb_integration` directly, with no system path side effects.

---------

Signed-off-by: spacegoing <spacegoing@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants