> This page is for version 0.4.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.data.tasks.harbor.dataset_config

The `[gym]` table of a dataset's `dataset.toml`: dataset-level settings for its tasks.

`task.toml` is the task author's file and, once fetched, read-only. What a dataset needs on top
of it goes here, as data: the facts Harbor has no field for (`license` and `type`, which say
which split the rows may enter; `allowed_agents`, the harnesses admitted to run it; `domain` and
`verified`, catalog metadata; `source`, the hub reference a committed entry under `environments/harbor/`
is pulled from), defaults that scale every task or set how many rollouts an
evaluation takes per task, and per-task overrides expressed with Harbor's own `[environment]`
fields. The loader applies the task-shaping settings before anything else sees a task, so servers,
agents and rows only ever see the effective `task.toml`; the other keys flow into the generated
run config's `datasets:` entry (`nemo_gym.data.tasks.harbor.materialize.run_config`).
Harbor's own tables in the same file (`[dataset]` and friends) are left to Harbor.

Deployment settings (which sandbox provider, registry credentials, image mirrors) do not belong
here: a dataset must run unchanged on every deployment.

## Module Contents

### Classes

| Name                                                                                  | Description                                                                            |
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [`GymDatasetConfig`](#nemo_gym-data-tasks-harbor-dataset_config-GymDatasetConfig)     | The whole `[gym]` table.                                                               |
| [`GymDatasetDefaults`](#nemo_gym-data-tasks-harbor-dataset_config-GymDatasetDefaults) | `[gym.defaults]`: generic policy applied to every task of the dataset.                 |
| [`GymTaskOverride`](#nemo_gym-data-tasks-harbor-dataset_config-GymTaskOverride)       | `[gym.tasks."&lt;task_id&gt;"]`: per-task overrides, written with Harbor's own fields. |

### Functions

| Name                                                                                        | Description                                                                                              |
| ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [`_added_artifacts`](#nemo_gym-data-tasks-harbor-dataset_config-_added_artifacts)           | -                                                                                                        |
| [`_override_environment`](#nemo_gym-data-tasks-harbor-dataset_config-_override_environment) | -                                                                                                        |
| [`_override_verifier`](#nemo_gym-data-tasks-harbor-dataset_config-_override_verifier)       | -                                                                                                        |
| [`_scale_environment`](#nemo_gym-data-tasks-harbor-dataset_config-_scale_environment)       | -                                                                                                        |
| [`_scale_step_timeouts`](#nemo_gym-data-tasks-harbor-dataset_config-_scale_step_timeouts)   | One `[[steps]]` entry with its own `[steps.agent].timeout_sec` and `[steps.verifier].timeout_sec` scaled |
| [`apply_dataset_config`](#nemo_gym-data-tasks-harbor-dataset_config-apply_dataset_config)   | The effective `task.toml` for `task_id`: overrides first, then the dataset defaults.                     |
| [`read_dataset_config`](#nemo_gym-data-tasks-harbor-dataset_config-read_dataset_config)     | The `[gym]` table of `&lt;folder&gt;/dataset.toml`; empty when the file or the table is absent.          |

### Data

[`DATASET_FILE`](#nemo_gym-data-tasks-harbor-dataset_config-DATASET_FILE)

[`DatasetSplit`](#nemo_gym-data-tasks-harbor-dataset_config-DatasetSplit)

[`GYM_TABLE`](#nemo_gym-data-tasks-harbor-dataset_config-GYM_TABLE)

[`SCALED_RESOURCES`](#nemo_gym-data-tasks-harbor-dataset_config-SCALED_RESOURCES)

[`TRAINING_SPLITS`](#nemo_gym-data-tasks-harbor-dataset_config-TRAINING_SPLITS)

### API

```python
class nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig()
```

**Bases:** `BaseModel`

The whole `[gym]` table.

**`_path`** `Path | None = PrivateAttr(default=None)`

---

**`allowed_agents`** `list[str] | None = None`

---

**`defaults`** `GymDatasetDefaults = Field(default_factory=GymDatasetDefaults)`

---

**`domain`** `Domain | None = None`

---

**`effective_type`** `str`

The split the rows enter: the declared one, else `validation` with a license, else `benchmark`.

---

**`is_empty`** `bool`

Whether the `[gym]` table says nothing at all: every key at its default.

What a scaffolded `dataset.toml` reads as (its keys are comments). Nothing branches on it: a task's
digest folds the table in by `shapes_tasks`, and the entry and run defaults read each key.

---

**`license`** `DatasetLicense | None = None`

---

**`model_config`** `= ConfigDict(extra='forbid')`

---

**`path`** `Path | None`

---

**`shapes_tasks`** `bool`

Whether any setting changes the effective `task.toml` (identity and run fields never do).

---

**`source`** `str | None = None`

---

**`tasks`** `dict[str, GymTaskOverride] = Field(default_factory=dict)`

---

**`type`** `DatasetSplit | None = None`

---

**`verified`** `bool = Field(default=False, strict=True)`

---

```python
nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig._allowed_agents_name_distinct_agents(
    value: list[str] | None
) -> list[str] | None
```

classmethod

```python
nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig._domain_is_one_of_gyms(
    value: typing.Any
) -> typing.Any
```

classmethod

Refuse a domain outside Gym's values with the values named: the entry's `domain` is the same enum.

```python
nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig._source_is_a_hub_reference(
    value: str | None
) -> str | None
```

classmethod

Refuse a source that is not a well-formed `harbor:` reference, in the hub's own words.

```python
nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig._training_splits_need_a_license() -> nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig
```

```python
nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig.admits(
    agent: str
) -> bool
```

Whether `agent` (an implementation name) may run the dataset: any when `allowed_agents` is unset.

```python
class nemo_gym.data.tasks.harbor.dataset_config.GymDatasetDefaults()
```

**Bases:** `BaseModel`

`[gym.defaults]`: generic policy applied to every task of the dataset.

**`model_config`** `= ConfigDict(extra='forbid')`

---

**`num_repeats`** `int = Field(default=1, ge=1, strict=True)`

---

**`resource_multiplier`** `float = Field(default=1.0, gt=0)`

---

**`timeout_multiplier`** `float = Field(default=1.0, gt=0)`

---

```python
class nemo_gym.data.tasks.harbor.dataset_config.GymTaskOverride()
```

**Bases:** `BaseModel`

`[gym.tasks."<task_id>"]`: per-task overrides, written with Harbor's own fields.

`environment` and `verifier` take any key of the task's `[environment]` and `[verifier]`
tables; `env` merges over the task's own and every other field replaces the task's value.
`artifacts` are added after the task's own `artifacts` entries, in Harbor's shape (a path, or a
table with `source`, `destination` and `service`).

**`artifacts`** `list[Any] = Field(default_factory=list)`

---

**`environment`** `dict[str, Any] = Field(default_factory=dict)`

---

**`model_config`** `= ConfigDict(extra='forbid')`

---

**`verifier`** `dict[str, Any] = Field(default_factory=dict)`

---

```python
nemo_gym.data.tasks.harbor.dataset_config._added_artifacts(
    entries: list[typing.Any],
    task_id: str
) -> list[nemo_gym.data.tasks.harbor.models.HarborArtifact]
```

```python
nemo_gym.data.tasks.harbor.dataset_config._override_environment(
    environment: nemo_gym.data.tasks.harbor.models.HarborEnvironment,
    override: dict[str, typing.Any],
    task_id: str
) -> nemo_gym.data.tasks.harbor.models.HarborEnvironment
```

```python
nemo_gym.data.tasks.harbor.dataset_config._override_verifier(
    verifier: nemo_gym.data.tasks.harbor.models.HarborVerifier,
    override: dict[str, typing.Any],
    task_id: str
) -> nemo_gym.data.tasks.harbor.models.HarborVerifier
```

```python
nemo_gym.data.tasks.harbor.dataset_config._scale_environment(
    environment: nemo_gym.data.tasks.harbor.models.HarborEnvironment,
    multiplier: float
) -> nemo_gym.data.tasks.harbor.models.HarborEnvironment
```

```python
nemo_gym.data.tasks.harbor.dataset_config._scale_step_timeouts(
    step: typing.Any,
    multiplier: float
) -> typing.Any
```

One `[[steps]]` entry with its own `[steps.agent].timeout_sec` and `[steps.verifier].timeout_sec` scaled
once; a budget the step does not name stays `None`, inherited through `HarborTaskConfig`'s step accessors
(the loader's hint about steps graded within the step default keys on that).

```python
nemo_gym.data.tasks.harbor.dataset_config.apply_dataset_config(
    config: nemo_gym.data.tasks.harbor.models.HarborTaskConfig,
    task_id: str,
    dataset: nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig
) -> nemo_gym.data.tasks.harbor.models.HarborTaskConfig
```

The effective `task.toml` for `task_id`: overrides first, then the dataset defaults.

```python
nemo_gym.data.tasks.harbor.dataset_config.read_dataset_config(
    folder: pathlib.Path
) -> nemo_gym.data.tasks.harbor.dataset_config.GymDatasetConfig
```

The `[gym]` table of `<folder>/dataset.toml`; empty when the file or the table is absent.

```python
nemo_gym.data.tasks.harbor.dataset_config.DATASET_FILE = 'dataset.toml'
```

```python
nemo_gym.data.tasks.harbor.dataset_config.DatasetSplit = Literal['train', 'validation', 'example', 'benchmark']
```

```python
nemo_gym.data.tasks.harbor.dataset_config.GYM_TABLE = 'gym'
```

```python
nemo_gym.data.tasks.harbor.dataset_config.SCALED_RESOURCES = ('cpus', 'memory_mb', 'storage_mb')
```

```python
nemo_gym.data.tasks.harbor.dataset_config.TRAINING_SPLITS = ('train', 'validation')
```