nemo_gym.cli.env
nemo_gym.cli.env
Module Contents
Classes
Functions
Data
_GRACEFUL_SHUTDOWN_TIMEOUT_SEC
API
Bases: BaseNeMoGymCLIConfig
Start NeMo Gym servers for agents, models, and resources.
Examples:
Bases: BaseNeMoGymCLIConfig
Run tests for all server modules in the project.
Examples:
Bases: RunConfig
Test a specific server module by running its pytest suite and optionally validating example data.
Examples:
Absolute server dir resolved against the cwd, then the Gym install root.
Use this for filesystem access (reading data, running the suite); use dir_path (the
relative entrypoint) for display and example commands shown to the user.
Resolve a relative server dir (e.g. resources_servers/<name>) to an absolute path.
Checks the current working directory first (a user’s local server), then falls back to the Gym
install root (PARENT_DIR) where built-in servers live in both editable and wheel installs.
This lets gym env test find and run built-in servers from any cwd, not just a repo checkout.
Deterministically select this shard’s subset of modules.
Round-robin (stride) over a sorted list spreads heavy modules across shards more evenly than contiguous chunks, which balances wall-time when the suite is parallelized across CI runners.
Display the resolved Hydra configuration for debugging purposes.
Examples:
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.
Initialize a new resources server with template files and directory structure.
Examples:
List the environments available under environments/, by short name.
Examples:
List packages installed in a server’s virtual environment.
Start NeMo Gym servers for agents, models, and resources.
This command reads configuration from YAML files specified via +config_paths and starts all configured servers.
The configuration files should define server instances with their entrypoints and settings.
Examples:
Validate a config without starting Ray or any server subprocess.
Runs the full config parse — config_paths resolution (missing/malformed), server cross-reference
validation, mandatory ??? values, and schema — then exits 0 (valid) or, via
exit_cleanly_on_config_error, 1 with a clean traceback-free message. No Ray, no servers, so it
returns in well under a second instead of after Ray bootstrap.
No model config is required: a dummy policy_model is injected (the NO_MODEL parser config, as
in gym list / env compose) so model interpolations (e.g. ${policy_base_url}) resolve —
validation is about config well-formedness, not the model. Pass a model config / --model-type
as well if you want it validated too.
Examples: