Skip to navigation

nemo_gym.orchestration.export_step

View as Markdown

One post-run export of a submitted benchmark, with its outcome kept in a result file.

The driver step of a job runs this after gym eval run, once per configured export: python3 -m nemo_gym.orchestration.export_step <exporter> +key=value .... The exporters themselves know nothing about it; what a job needs on top of them (telling several exports apart afterwards, not repeating one that finished, retrying one that was interrupted) lives here.

Module Contents

Functions

NameDescription
_read_state-
_result_payload-
_write_json_atomically-
mainpython3 -m nemo_gym.orchestration.export_step &lt;exporter&gt; +key=value ...: the settings are Hydra overrides.
run_exportRun the post-run exporter name on the run rollouts_jsonl_fpath points at.

Data

RUNNING_STATE

_FINAL_STATES

API

nemo_gym.orchestration.export_step._read_state(
path: pathlib.Path
) -> typing.Optional[str]
nemo_gym.orchestration.export_step._result_payload(
) -> dict[str, typing.Any]
nemo_gym.orchestration.export_step._write_json_atomically(
path: pathlib.Path,
payload: dict[str, typing.Any]
) -> None
nemo_gym.orchestration.export_step.main() -> None

python3 -m nemo_gym.orchestration.export_step <exporter> +key=value ...: the settings are Hydra overrides.

nemo_gym.orchestration.export_step.run_export(
name: str,
global_config_dict: omegaconf.DictConfig

Run the post-run exporter name on the run rollouts_jsonl_fpath points at.

result_json_fpath is a setting of this step, not of the exporters. When it is set, the outcome is also kept in that file, which is how a job that runs several exports can tell them apart afterwards: no file means never attempted, running means interrupted (for example at the walltime), and anything else is a final result. An export that already succeeded or was skipped is not repeated; a failed or interrupted one is retried. A configuration error is recorded as a failed result too, and still raised.

nemo_gym.orchestration.export_step.RUNNING_STATE = 'running'
nemo_gym.orchestration.export_step._FINAL_STATES = (ExportState.SUCCEEDED.value, ExportState.SKIPPED.value)