bug: nonexistent config path dumps raw FileNotFoundError traceback
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- Half a day
- Newbie friendliness
- 78/100
Research direction
Start in nemo_gym/global_config.py at load_extra_config_paths() around line 206, then trace the CLI entrypoint used by ng_run. Reproduce the problem with the provided ng_run command and verify that a nonexistent path reports the resolved path and resolution context without a traceback. Done means missing config paths fail fast with a concise actionable message.
Written by the indexing model from the issue text.
Description
Summary
Found by our virtual developer review agent.
When a user passes a typo'd or nonexistent path in +config_paths, NeMo Gym raises a bare FileNotFoundError with a full traceback instead of a clear, actionable error message.
Location
nemo_gym/global_config.py — load_extra_config_paths() (~line 206)
extra_config = OmegaConf.load(config_path)
The function resolves relative paths against cwd and PARENT_DIR, but never checks that the resolved path exists before calling OmegaConf.load().
Current behavior
A routine user error (typo in config path) produces a 7-frame traceback:
FileNotFoundError: [Errno 2] No such file or directory:
'.../resources_servers/does_not_exist/configs/nope.yaml'
The absolute path is present but buried in the traceback, and there is no guidance on how to fix it.
Expected behavior
A missing config path should fail fast with a concise, user-facing message (no traceback) that includes the resolved path and where it was checked.
Suggested fix
Guard the OmegaConf.load() call with a path-existence check and raise a clean SystemExit with the resolved path and resolution context (cwd vs install root). Catch this in the CLI entrypoint so a traceback is not printed.
Example:
if not config_path.exists():
raise SystemExit(
f"Config file not found: {config_path}\n"
f"Checked relative to cwd ({Path.cwd()}) and install root ({PARENT_DIR})."
)
extra_config = OmegaConf.load(config_path)
Repro
ng_run "+config_paths=[resources_servers/does_not_exist/configs/nope.yaml]"
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 349
- Avg merge
- 2d 40m
- Merged PRs (30d)
- 320
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA-NeMo/Gym
-
community-request waiting-on-maintainers
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
NVIDIA-NeMo/Gym#3500 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 74/100
NVIDIA-NeMo/Gym#3328 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NVIDIA-NeMo/Gym#3312 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
NVIDIA-NeMo/Gym#2994 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
NVIDIA-NeMo/Gym#2937 · 1 comment ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100