nemo_gym.cli.utils
nemo_gym.cli.utils
Module Contents
Functions
API
A Did you mean \X`?fragment for the closest candidate tovalue, or ""` if none is close enough.
Decorator: turn user-facing ConfigError into a clean message + non-zero exit.
Config mistakes (missing/typo’d config_paths, malformed config_paths, nothing configured to run) should fail fast with an actionable message, not a Python traceback. Unexpected errors still propagate normally.
Print an unknown <type> '<name>' error (with a did-you-mean hint) and exit nonzero.
Whether query fuzzily matches any of fields: a substring or a close difflib match (token-aware).
The shared matcher behind gym search <type> <query> across every component type.
Print the standard ‘nothing to show’ message for a gym list/gym search command.
component_type is the plural noun (benchmarks, environments, …). Keeps the message
and styling identical across every listing.
Print a Rich table without truncating cells when standard output is piped.
Rich normally renders redirected output with an 80-column console.
FORCE_COLOR can also make Rich report a pipe as a terminal.
Use the stream’s actual TTY status so redirected output preserves every cell.
Render the uniform gym list <type> <name> inspect view (or its --json payload).
details is an ordered label -> value mapping (e.g. {"config": ..., "agent": ...}). Text
sections (domain suffix, description, Details, Usage example) are omitted when empty.