> 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.utils.path_utils

## Module Contents

### Functions

| Name                                                                                        | Description                                                                                                       |
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [`aggregate_metrics_path_for`](#nemo_gym-utils-path_utils-aggregate_metrics_path_for)       | `results/rollouts.jsonl` -> `results/rollouts_aggregate_metrics.json`.                                            |
| [`aggregation_sources_path_for`](#nemo_gym-utils-path_utils-aggregation_sources_path_for)   | `results/rollouts.jsonl` -> `results/rollouts_sources.json`: the shards `gym eval aggregate` merged into it.      |
| [`attempt_extension_path_for`](#nemo_gym-utils-path_utils-attempt_extension_path_for)       | Where `gym eval resubmit --recover --extend-attempts N` records the attempts it added to every rollout's cap.     |
| [`batch_status_path_for`](#nemo_gym-utils-path_utils-batch_status_path_for)                 | `results/math.jsonl` -> `results/math_batch_status.json`.                                                         |
| [`export_done_path_for`](#nemo_gym-utils-path_utils-export_done_path_for)                   | `results/rollouts.jsonl`, `mlflow` -> `results/rollouts_mlflow_export_done`: set once the run was exported.       |
| [`exporter_run_id_path_for`](#nemo_gym-utils-path_utils-exporter_run_id_path_for)           | `results/rollouts.jsonl`, `mlflow` -> `results/rollouts_mlflow_run_id`: the run a live exporter logs to.          |
| [`failures_path_for`](#nemo_gym-utils-path_utils-failures_path_for)                         | -                                                                                                                 |
| [`materialized_path_for`](#nemo_gym-utils-path_utils-materialized_path_for)                 | `results/rollouts.jsonl` -> `results/rollouts_materialized_inputs.jsonl`.                                         |
| [`rerun_masked_journal_path_for`](#nemo_gym-utils-path_utils-rerun_masked_journal_path_for) | Where `gym eval resubmit --recover --rerun-masked-without-artifact` journals the operator's approval to run again |
| [`resolved_config_path_for`](#nemo_gym-utils-path_utils-resolved_config_path_for)           | `results/rollouts.jsonl` -> `results/rollouts_resolved_config.yaml`.                                              |
| [`resubmit_offset_path_for`](#nemo_gym-utils-path_utils-resubmit_offset_path_for)           | Where `gym eval resubmit` records the failures sidecar's line count; failures before it no longer count.          |
| [`run_summary_path_for`](#nemo_gym-utils-path_utils-run_summary_path_for)                   | `results/rollouts.jsonl` -> `results/rollouts_run_summary.json`.                                                  |

### Data

[`RERUN_MASKED_JOURNAL_NAME`](#nemo_gym-utils-path_utils-RERUN_MASKED_JOURNAL_NAME)

### API

```python
nemo_gym.utils.path_utils.aggregate_metrics_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

`results/rollouts.jsonl` -> `results/rollouts_aggregate_metrics.json`.

Mirrors how rollout collection and reverification name the file they write, so consumers
(e.g. `gym eval compare`) derive the same path the writers produced.

```python
nemo_gym.utils.path_utils.aggregation_sources_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

`results/rollouts.jsonl` -> `results/rollouts_sources.json`: the shards `gym eval aggregate` merged into it.

```python
nemo_gym.utils.path_utils.attempt_extension_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

Where `gym eval resubmit --recover --extend-attempts N` records the attempts it added to every rollout's cap.

```python
nemo_gym.utils.path_utils.batch_status_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

`results/math.jsonl` -> `results/math_batch_status.json`.

```python
nemo_gym.utils.path_utils.export_done_path_for(
    output_fpath: pathlib.Path,
    exporter: str
) -> pathlib.Path
```

`results/rollouts.jsonl`, `mlflow` -> `results/rollouts_mlflow_export_done`: set once the run was exported.

```python
nemo_gym.utils.path_utils.exporter_run_id_path_for(
    output_fpath: pathlib.Path,
    exporter: str
) -> pathlib.Path
```

`results/rollouts.jsonl`, `mlflow` -> `results/rollouts_mlflow_run_id`: the run a live exporter logs to.

```python
nemo_gym.utils.path_utils.failures_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

```python
nemo_gym.utils.path_utils.materialized_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

`results/rollouts.jsonl` -> `results/rollouts_materialized_inputs.jsonl`.

```python
nemo_gym.utils.path_utils.rerun_masked_journal_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

Where `gym eval resubmit --recover --rerun-masked-without-artifact` journals the operator's approval to run again
masked results that kept a saved answer but have neither a gradeable artifact nor a grade: beside the rollouts file
and named after it, like the attempt extension, so two rollouts files in one directory never share approvals.

`results/rollouts.jsonl` -> `results/rollouts_rerun_masked_journal.jsonl`.

```python
nemo_gym.utils.path_utils.resolved_config_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

`results/rollouts.jsonl` -> `results/rollouts_resolved_config.yaml`.

```python
nemo_gym.utils.path_utils.resubmit_offset_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

Where `gym eval resubmit` records the failures sidecar's line count; failures before it no longer count.

```python
nemo_gym.utils.path_utils.run_summary_path_for(
    output_fpath: pathlib.Path
) -> pathlib.Path
```

`results/rollouts.jsonl` -> `results/rollouts_run_summary.json`.

The per-run summary a Harbor run writes beside its rollouts (`nemo_gym.data.tasks.harbor.run_summary`),
named like the other sidecars so a renamed `--output` keeps them together.

```python
nemo_gym.utils.path_utils.RERUN_MASKED_JOURNAL_NAME = rerun_masked_journal_path_for(Path('rollouts.jsonl')).name
```