nemo_gym.cli_setup_command#

Module Contents#

Functions#

_get_nemo_gym_install_flags

Build uv pip install flags for nemo-gym in sub-venvs.

_get_nemo_gym_version_spec

Detect nemo-gym version from parent venv and return version specifier.

setup_env_command

run_command

API#

nemo_gym.cli_setup_command._get_nemo_gym_install_flags() str[source]#

Build uv pip install flags for nemo-gym in sub-venvs.

Supports:

  • Pre-release versions via NEMO_GYM_ALLOW_PRERELEASE=true

  • Custom PyPI indexes via UV_INDEX_URL, UV_EXTRA_INDEX_URL, UV_INDEX_STRATEGY

  • Auto-detection of parent venv version for consistency

Returns:

String of flags to add to ‘uv pip install nemo-gym’ Example: “–pre –index-url https://test.pypi.org/simple/ ==0.2.1rc0”

nemo_gym.cli_setup_command._get_nemo_gym_version_spec(is_editable_install: bool) str[source]#

Detect nemo-gym version from parent venv and return version specifier.

Parameters:

is_editable_install – Whether nemo-gym is installed in editable mode in parent venv

Returns:

Version specifier string (e.g., “==0.2.1rc0”) or empty string

nemo_gym.cli_setup_command.setup_env_command(
dir_path: pathlib.Path,
global_config_dict: omegaconf.DictConfig,
prefix: str,
) str[source]#
nemo_gym.cli_setup_command.run_command(
command: str,
working_dir_path: pathlib.Path,
server_name: str = '',
) subprocess.Popen[source]#