nemo_gym.cli.main
nemo_gym.cli.main
Module Contents
Classes
Functions
Data
API
Bases: ArgumentParser
ArgumentParser that appends a difflib “did you mean?” hint to invalid-choice errors.
Covers mistyped commands/groups and bad —flag choices (e.g. —storage), since argparse validates all of them as choices against the registry baked into the parser.
Map a named asset (name or name/flavor) to its config path.
Searches the Gym install root (PARENT_DIR — where the built-in asset trees live in both
editable and wheel installs), then the current working directory (the user’s project), then
any user-registered —search-dir roots. Searching PARENT_DIR is what lets built-ins resolve
by name from an arbitrary cwd (e.g. a wheel install), not just from inside the repo checkout.
A --<flag> NAME selector that resolves the named asset to a config and adds it to +config_paths.
A --name store_true flag that maps to the Hydra override +<hydra_key>=true when set.
A Did you mean \X`?fragment for the closest candidate tovalue, or ""` if none is close enough.
Coalesce all +config_paths=[...] tokens (from —config and asset selectors) into one (Hydra rejects dupes).
A --name VALUE flag that maps to the Hydra override +<hydra_key>=VALUE (omitted when unset).