NVIDIA-NeMo / NVIDIA-NeMo/Run

CLI crashes for task parameters starting with run/executor/plugins (e.g. runtime=…): "Run overwrites must start with 'run.'"

Open
#604 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

community-request waiting-on-maintainers
Dominant language
Python
Stars
258
Forks
113
Avg merge
1d 3h
Merged PRs (30d)
5

Description

Description

Any @run.cli.entrypoint function with a parameter whose name starts with a reserved prefix (run, executor, plugins) cannot be configured from the CLI — the invocation crashes before the task argument parser runs:

ValueError: Run overwrites must start with 'run.'. Got runtime=120

Affected names include runtime, run_id, runs_per_epoch, executors, plugins_dir etc — all normal parameter names.

Steps to reproduce
# app.py
import nemo_run as run

@run.cli.entrypoint(skip_confirmation=True)
def train(runtime: int = 60, lr: float = 0.1):
    print(runtime, lr)

if __name__ == "__main__":
    run.cli.main(train)
$ python app.py runtime=120 lr=0.2
ValueError: Run overwrites must start with 'run.'. Got runtime=120

Unit-level: _parse_prefixed_args(["runtime=3600"], "run") raises.

Expected behavior

runtime is a task parameter, the run should behave like any other name (max_runtime=120 works today). Only run=…, run.…, run[…] (and executor/plugins equivalents) should be treated as prefixed overwrites.

Actual behavior

RunContext.cli_execute passes all task args through _parse_prefixed_args(args, "run"), which matches startswith("run") with no word boundary.

Two more issues in the same function:

  • _parse_prefixed_args(["run.a.run.b=1"], "run") returns a.b=1 — every run. occurrence is stripped, silently targeting the wrong parameter.
  • _parse_prefixed_args(["executor=k=v"], "executor") returns value k instead of k=v (value split at first =).
Environment

nemo-run main (b85eb67), Python 3.12, macOS

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.

Research direction

Start with _parse_prefixed_args and its caller, RunContext.cli_execute. Reproduce the unit-level cases for runtime=3600, repeated run. prefixes, and executor=k=v, then trace the existing argument parsing behavior. Done means ordinary task parameters are accepted, only valid leading prefixes are handled, repeated prefixes are not silently removed, and values containing '=' are preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.