Skip to navigation

nemo_gym.cli.dev

View as MarkdownOpen in Claude

Module Contents

Functions

NameDescription
_literalEscape ${ (and any backslashes directly before it) so OmegaConf hands the text back unchanged instead of
dev_compareCompare two rollout JSONL files task by task (identical, flipped, masked, missing) and print the losing side’s
dev_testRun core NeMo Gym tests with coverage reporting (runs pytest with —cov flag).

Data

_INTERPOLATION_OPENER

API

nemo_gym.cli.dev._literal(
value: str
) -> str

Escape ${ (and any backslashes directly before it) so OmegaConf hands the text back unchanged instead of treating it as an interpolation.

nemo_gym.cli.dev.dev_compare(
json_stdout: bool = False,
cli_values: typing.Optional[str] = {}
) -> None

Compare two rollout JSONL files task by task (identical, flipped, masked, missing) and print the losing side’s verifier output for every flip. A temporary migration aid: the gate before an old resources server is deleted in favour of its Harbor-path replacement.

cli_values are the paths and quoted options exactly as argparse parsed them (see _dev_compare in main.py); they seed the config directly because Hydra’s override grammar mangles non-ASCII and backslashes, with ${ escaped so OmegaConf does not interpolate them either. Hydra overrides on the command line (+tail=3, +json=true) still apply on top.

Examples:

gym dev compare old/rollouts.jsonl new/rollouts.jsonl --logs-root environment_servers/harbor --json compare.json
nemo_gym.cli.dev.dev_test()

Run core NeMo Gym tests with coverage reporting (runs pytest with —cov flag).

Examples:

gym dev test
nemo_gym.cli.dev._INTERPOLATION_OPENER = re.compile('(\\\\*)\\$\\{')