> 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.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: defaults that scale every task, and per-task overrides expressed with
Harbor's own `[environment]` fields. The loader applies them before anything else sees a task,
so servers, agents and rows only ever see the effective `task.toml`. 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-tasks-harbor-dataset_config-GymDatasetConfig)     | The whole `[gym]` table.                                                                         |
| [`GymDatasetDefaults`](#nemo_gym-tasks-harbor-dataset_config-GymDatasetDefaults) | `[gym.defaults]`: generic policy applied to every task of the dataset.                           |
| [`GymTaskOverride`](#nemo_gym-tasks-harbor-dataset_config-GymTaskOverride)       | `[gym.tasks."&lt;task_id&gt;"]`: per-task overrides, written with Harbor `[environment]` fields. |

### Functions

| Name                                                                                   | Description                                                                                     |
| -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [`_override_environment`](#nemo_gym-tasks-harbor-dataset_config-_override_environment) | -                                                                                               |
| [`_scale_environment`](#nemo_gym-tasks-harbor-dataset_config-_scale_environment)       | -                                                                                               |
| [`apply_dataset_config`](#nemo_gym-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-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-tasks-harbor-dataset_config-DATASET_FILE)

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

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

### API

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

**Bases:** `BaseModel`

The whole `[gym]` table.

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

---

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

---

**`is_empty`** `bool`

---

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

---

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

---

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

---

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

**Bases:** `BaseModel`

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

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

---

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

---

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

---

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

**Bases:** `BaseModel`

`[gym.tasks."&lt;task_id&gt;"]`: per-task overrides, written with Harbor `[environment]` fields.

`env` merges over the task's own; every other field replaces the task's value.

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

---

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

---

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

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

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

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

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

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

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

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

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