> This page is for version 0.5.0.
> For other versions, use one of these documentation indexes:
> - Main (default): https://docs.nvidia.com/nemo/gym/main/llms.txt
> - 0.7.0: https://docs.nvidia.com/nemo/gym/v0.7.0/llms.txt
> - 0.6.0: https://docs.nvidia.com/nemo/gym/v0.6.0/llms.txt
> - 0.5.1: https://docs.nvidia.com/nemo/gym/v0.5.1/llms.txt
> - 0.5.0: https://docs.nvidia.com/nemo/gym/v0.5.0/llms.txt
> - 0.4.0: https://docs.nvidia.com/nemo/gym/v0.4.0/llms.txt
> - 0.3.0: https://docs.nvidia.com/nemo/gym/v0.3.0/llms.txt
> - 0.2.1: https://docs.nvidia.com/nemo/gym/v0.2.1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/gym/_mcp/server.

# nemo_gym.orchestration.export_step

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

| Name                                                                                   | Description                                                                                                        |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [`_read_state`](#nemo_gym-orchestration-export_step-_read_state)                       | -                                                                                                                  |
| [`_result_payload`](#nemo_gym-orchestration-export_step-_result_payload)               | -                                                                                                                  |
| [`_write_json_atomically`](#nemo_gym-orchestration-export_step-_write_json_atomically) | -                                                                                                                  |
| [`main`](#nemo_gym-orchestration-export_step-main)                                     | `python3 -m nemo_gym.orchestration.export_step &lt;exporter&gt; +key=value ...`: the settings are Hydra overrides. |
| [`run_export`](#nemo_gym-orchestration-export_step-run_export)                         | Run the post-run exporter `name` on the run `rollouts_jsonl_fpath` points at.                                      |

### Data

[`RUNNING_STATE`](#nemo_gym-orchestration-export_step-RUNNING_STATE)

[`_FINAL_STATES`](#nemo_gym-orchestration-export_step-_FINAL_STATES)

### API

```python
nemo_gym.orchestration.export_step._read_state(
    path: pathlib.Path
) -> typing.Optional[str]
```

```python
nemo_gym.orchestration.export_step._result_payload(
    result: nemo_gym.artifacts.exporters.base.ExportResult
) -> dict[str, typing.Any]
```

```python
nemo_gym.orchestration.export_step._write_json_atomically(
    path: pathlib.Path,
    payload: dict[str, typing.Any]
) -> None
```

```python
nemo_gym.orchestration.export_step.main() -> None
```

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

```python
nemo_gym.orchestration.export_step.run_export(
    name: str,
    global_config_dict: omegaconf.DictConfig
) -> nemo_gym.artifacts.exporters.base.ExportResult
```

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.

```python
nemo_gym.orchestration.export_step.RUNNING_STATE = 'running'
```

```python
nemo_gym.orchestration.export_step._FINAL_STATES = (ExportState.SUCCEEDED.value, ExportState.SKIPPED.value)
```