Skip to navigation

nemo_gym.orchestration.exports

View as Markdown

Post-run exports of a submitted benchmark: which ones apply, with what settings, and whether they are valid.

Module Contents

Functions

NameDescription
_mergeoverrides on top of defaults: nested settings (such as meta) merge, everything else is replaced.
effective_exportsThe exports a benchmark runs after its rollouts, by exporter name, with the submit config’s own settings.
export_install_extrasThe extras the job’s Gym install needs for in-process exporters. Isolated ones install their own SDK.
export_run_settingsThe full settings of one export: the submit config’s own plus what only the orchestrator knows.
validate_exportsReject, at submit time, any export that could not run: raises ValueError naming the benchmark and why.

Data

RESERVED_SETTINGS

RESULT_JSON_FPATH_KEY

ROLLOUTS_JSONL_FPATH_KEY

_GYM_JOB_ID_PREFIX

API

nemo_gym.orchestration.exports._merge(
defaults: dict[str, typing.Any],
overrides: dict[str, typing.Any]
) -> dict[str, typing.Any]

overrides on top of defaults: nested settings (such as meta) merge, everything else is replaced.

nemo_gym.orchestration.exports.effective_exports(
benchmark_name: str
) -> dict[str, dict[str, typing.Any]]

The exports a benchmark runs after its rollouts, by exporter name, with the submit config’s own settings.

job.export gives every benchmark a default; a benchmark’s own export override it setting by setting, and null for an exporter drops it for that benchmark. A benchmark that runs a command has no rollouts file for an exporter to read, so it takes none of the job-level defaults.

nemo_gym.orchestration.exports.export_install_extras(
names: list[str]
) -> tuple[str, ...]

The extras the job’s Gym install needs for in-process exporters. Isolated ones install their own SDK.

nemo_gym.orchestration.exports.export_run_settings(
name: str,
settings: dict[str, typing.Any],
benchmark_name: str,
gym_job_id: str,
bench_dir: pathlib.Path
) -> dict[str, typing.Any]

The full settings of one export: the submit config’s own plus what only the orchestrator knows.

Names a run after the benchmark and the submission unless the submit config names it, and points the export at the benchmark’s rollouts and its result file.

nemo_gym.orchestration.exports.validate_exports(
) -> None

Reject, at submit time, any export that could not run: raises ValueError naming the benchmark and why.

nemo_gym.orchestration.exports.RESERVED_SETTINGS = (ROLLOUTS_JSONL_FPATH_KEY, RESULT_JSON_FPATH_KEY, 'exporter')
nemo_gym.orchestration.exports.RESULT_JSON_FPATH_KEY = 'result_json_fpath'
nemo_gym.orchestration.exports.ROLLOUTS_JSONL_FPATH_KEY = 'rollouts_jsonl_fpath'
nemo_gym.orchestration.exports._GYM_JOB_ID_PREFIX = 'gym-job-'