feat: running `ng_run` outside of the gym repository

Open
#625 7 comments 0 reactions 1 assignee View on GitHub

@cmunley1 is already working on this.

Since Jan 29, 2026.

Assessment

This issue has not been assessed yet.

Description

CLI community-request waiting-on-customer

I'd like to use Gym as a dependency in a project and I've therefore installed NeMo-RL (containing Gym) as a submodule of my project. Then in my project I have created a gym folder containing my custom resources servers and responses api agents.

Basically here is what my gym folder looks like

OwkinZero/agentic/gym
├── README.md
├── create_symlinks.sh
├── resources_servers
│   └── llm_judge_reward
│       ├── README.md
│       ├── app.py
│       ├── configs
│       └── requirements.txt
├── responses_api_agents
│   └── idea_generator_agent
│       ├── README.md
│       ├── __init__.py
│       ├── app.py
│       ├── client.py
│       ├── configs
│       ├── data
│       ├── outputs
│       └── requirements.txt
└── scripts
    └── submit_training.sh

I tried to run the ng_run command from my working directory (called OwkinZero/agentic). First, in order to have access to the command I installed nemo_gym in editable mode. Then I encountered a first issue: the env variables defined in my env.yaml file (located at the root of OwkinZero/agentic) were not loaded. I had to add the file to the config_paths list.

So here is the commands I run

config_paths="/fsx/xav/code/OwkinZero/agentic/env.yaml,/fsx/xav/code/OwkinZero/agentic/gym/responses_api_agents/idea_generator_agent/configs/idea_generator_agent.yaml,/fsx/xav/code/OwkinZero/agentic/gym/resources_servers/llm_judge_reward/configs/llm_judge_reward.yaml,/fsx/xav/code/OwkinZero/agentic/gym/responses_api_agents/idea_generator_agent/configs/gpt_5_nano.yaml"

ng_run "+config_paths=[${config_paths}]"

And here is the error that I get

Starting Ray cluster...
2026-01-22 16:36:42,971	INFO worker.py:1942 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265
Started Ray cluster at 10.1.25.93:56390
Traceback (most recent call last):
  File "/fsx/xav/code/OwkinZero/agentic/.venv/bin/ng_run", line 10, in <module>
    sys.exit(run())
             ^^^^^
  File "/fsx/xav/code/OwkinZero/agentic/.venv/lib/python3.12/site-packages/nemo_gym/cli.py", line 396, in run
    rh.start(global_config_dict_parser_config)
  File "/fsx/xav/code/OwkinZero/agentic/.venv/lib/python3.12/site-packages/nemo_gym/cli.py", line 212, in start
    command = f"""{_setup_env_command(dir_path, global_config_dict)} \\
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fsx/xav/code/OwkinZero/agentic/.venv/lib/python3.12/site-packages/nemo_gym/cli.py", line 78, in _setup_env_command
    raise RuntimeError(f"Missing pyproject.toml or requirements.txt for uv venv setup in server dir: {dir_path}")
RuntimeError: Missing pyproject.toml or requirements.txt for uv venv setup in server dir: /fsx/xav/code/OwkinZero/agentic/.venv/lib/python3.12/site-packages/responses_api_agents/idea_generator_agent
INFO:     Started server process [1900511]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:11000 (Press CTRL+C to quit)

Note the /fsx/xav/code/OwkinZero/agentic/.venv/lib/python3.12/site-packages/responses_api_agents/idea_generator_agent actually does not exist.

The only workaround that I found was to create symbolic links from my custom resource servers and resource api agents to the corresponding folder in the Gym repo and to run ng_run from Gym but that's not very convenient.

Is there a way to run ng_run from my project root or am I forced to put new resource servers in the Gym directory?

Dominant language
Python
Stars
1.2k
Forks
349
Avg merge
1d 21h
Merged PRs (30d)
318

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/Gym

All issues in NVIDIA-NeMo/Gym

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.