Skip to content

DRAFT fix: prefer real NeMo-Gym package in actor#2867

Open
snowmanwwg wants to merge 1 commit into
mainfrom
fix/nemo-gym-package-precedence
Open

DRAFT fix: prefer real NeMo-Gym package in actor#2867
snowmanwwg wants to merge 1 commit into
mainfrom
fix/nemo-gym-package-precedence

Conversation

@snowmanwwg

Copy link
Copy Markdown
Contributor

The PR fixes the old NeMo-Gym PARENT_DIR crash in NeMo-RL.

When NeMo-RL starts a NeMo-Gym actor, Python could accidentally grab the wrong folder named nemo_gym:

  • Wrong one: examples/nemo_gym
  • Correct one: 3rdparty/Gym-workspace/Gym/nemo_gym

The wrong one is just an examples folder, so it does not contain PARENT_DIR. That caused:

ImportError: cannot import name 'PARENT_DIR' from 'nemo_gym'

The PR makes NeMo-RL do this before starting NeMo-Gym:

  1. Put the real NeMo-Gym package path first.
  2. If Python already loaded the wrong examples/nemo_gym, clear it out.
  3. Then import NeMo-Gym normally.

It also fixes a smaller environment bug: NeMo-RL was setting VIRTUAL_ENV to the Python executable path like:

.../bin/python

but it should point to the venv folder:

.../

So the PR makes that correct too.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

Signed-off-by: Wenwen Gao <wenweng@cw-dfw-cs-001-vscode-01.cm.cluster>
@snowmanwwg snowmanwwg requested review from a team as code owners June 18, 2026 04:03
@copy-pr-bot

copy-pr-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

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.

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.

1 participant