nemo_gym.cli.utils
nemo_gym.cli.utils
Module Contents
Functions
API
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 a Rich table without the 80-col truncation Rich applies when stdout is piped.
On a TTY, Rich sizes the console to the terminal. When stdout is redirected (e.g.
gym list benchmarks | cat), Rich falls back to an 80-column console and truncates cells
with an ellipsis, silently losing data. We measure the table’s natural width and render at
that width so piped output is lossless, while leaving interactive terminal output unchanged.