> 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 full documentation content, see https://docs.nvidia.com/nemo/gym/llms-full.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.config_types

## Module Contents

### Classes

| Name                                                                                                                      | Description                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [`AgentServerRef`](#nemo_gym-config_types-AgentServerRef)                                                                 | -                                                                                                       |
| [`AggregateMetrics`](#nemo_gym-config_types-AggregateMetrics)                                                             | Response from /aggregate\_metrics.                                                                      |
| [`AggregateMetricsRequest`](#nemo_gym-config_types-AggregateMetricsRequest)                                               | POST body for /aggregate\_metrics.                                                                      |
| [`BaseNeMoGymCLIConfig`](#nemo_gym-config_types-BaseNeMoGymCLIConfig)                                                     | -                                                                                                       |
| [`BaseRunServerConfig`](#nemo_gym-config_types-BaseRunServerConfig)                                                       | -                                                                                                       |
| [`BaseRunServerInstanceConfig`](#nemo_gym-config_types-BaseRunServerInstanceConfig)                                       | -                                                                                                       |
| [`BaseRunServerTypeConfig`](#nemo_gym-config_types-BaseRunServerTypeConfig)                                               | -                                                                                                       |
| [`BaseServerConfig`](#nemo_gym-config_types-BaseServerConfig)                                                             | -                                                                                                       |
| [`BaseServerInstanceConfig`](#nemo_gym-config_types-BaseServerInstanceConfig)                                             | -                                                                                                       |
| [`BaseServerTypeConfig`](#nemo_gym-config_types-BaseServerTypeConfig)                                                     | -                                                                                                       |
| [`BaseUploadJsonlDatasetHuggingFaceConfig`](#nemo_gym-config_types-BaseUploadJsonlDatasetHuggingFaceConfig)               | Upload a JSONL dataset to HuggingFace Hub with automatic naming based on domain and resources server.   |
| [`BenchmarkDatasetConfig`](#nemo_gym-config_types-BenchmarkDatasetConfig)                                                 | -                                                                                                       |
| [`DatasetConfig`](#nemo_gym-config_types-DatasetConfig)                                                                   | -                                                                                                       |
| [`DeleteJsonlDatasetGitlabConfig`](#nemo_gym-config_types-DeleteJsonlDatasetGitlabConfig)                                 | Delete a dataset from GitLab Model Registry (prompts for confirmation).                                 |
| [`Domain`](#nemo_gym-config_types-Domain)                                                                                 | -                                                                                                       |
| [`DownloadJsonlDatasetGitlabConfig`](#nemo_gym-config_types-DownloadJsonlDatasetGitlabConfig)                             | Download a JSONL dataset from GitLab Model Registry.                                                    |
| [`DownloadJsonlDatasetHuggingFaceConfig`](#nemo_gym-config_types-DownloadJsonlDatasetHuggingFaceConfig)                   | Download a JSONL dataset from HuggingFace Hub to local filesystem.                                      |
| [`JsonlDatasetGitlabIdentifer`](#nemo_gym-config_types-JsonlDatasetGitlabIdentifer)                                       | -                                                                                                       |
| [`JsonlDatasetHuggingFaceIdentifer`](#nemo_gym-config_types-JsonlDatasetHuggingFaceIdentifer)                             | -                                                                                                       |
| [`ModelServerRef`](#nemo_gym-config_types-ModelServerRef)                                                                 | -                                                                                                       |
| [`ResourcesServerInstanceConfig`](#nemo_gym-config_types-ResourcesServerInstanceConfig)                                   | -                                                                                                       |
| [`ResourcesServerRef`](#nemo_gym-config_types-ResourcesServerRef)                                                         | -                                                                                                       |
| [`ResourcesServerTypeConfig`](#nemo_gym-config_types-ResourcesServerTypeConfig)                                           | -                                                                                                       |
| [`ResponsesAPIAgentServerInstanceConfig`](#nemo_gym-config_types-ResponsesAPIAgentServerInstanceConfig)                   | -                                                                                                       |
| [`ResponsesAPIAgentServerTypeConfig`](#nemo_gym-config_types-ResponsesAPIAgentServerTypeConfig)                           | -                                                                                                       |
| [`ResponsesAPIModelServerInstanceConfig`](#nemo_gym-config_types-ResponsesAPIModelServerInstanceConfig)                   | -                                                                                                       |
| [`ResponsesAPIModelServerTypeConfig`](#nemo_gym-config_types-ResponsesAPIModelServerTypeConfig)                           | -                                                                                                       |
| [`UploadJsonlDatasetGitlabConfig`](#nemo_gym-config_types-UploadJsonlDatasetGitlabConfig)                                 | Upload a local jsonl dataset artifact to Gitlab.                                                        |
| [`UploadJsonlDatasetHuggingFaceConfig`](#nemo_gym-config_types-UploadJsonlDatasetHuggingFaceConfig)                       | Upload a JSONL dataset to HuggingFace Hub and automatically delete from GitLab after successful upload. |
| [`UploadJsonlDatasetHuggingFaceMaybeDeleteConfig`](#nemo_gym-config_types-UploadJsonlDatasetHuggingFaceMaybeDeleteConfig) | Upload a JSONL dataset to HuggingFace Hub with optional GitLab deletion after successful upload.        |
| [`WANDBConfig`](#nemo_gym-config_types-WANDBConfig)                                                                       | -                                                                                                       |

### Functions

| Name                                                                                          | Description                                                                       |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [`is_almost_server`](#nemo_gym-config_types-is_almost_server)                                 | Detects if a config looks like a server but might fail validation.                |
| [`is_server_ref`](#nemo_gym-config_types-is_server_ref)                                       | -                                                                                 |
| [`maybe_get_server_instance_config`](#nemo_gym-config_types-maybe_get_server_instance_config) | Returns ServerInstanceConfig if a valid server, otherwise None with error details |

### Data

[`AGENT_REF_KEY`](#nemo_gym-config_types-AGENT_REF_KEY)

[`DatasetType`](#nemo_gym-config_types-DatasetType)

[`ServerInstanceConfig`](#nemo_gym-config_types-ServerInstanceConfig)

[`ServerInstanceConfigTypeAdapter`](#nemo_gym-config_types-ServerInstanceConfigTypeAdapter)

[`ServerRef`](#nemo_gym-config_types-ServerRef)

[`ServerRefTypeAdapter`](#nemo_gym-config_types-ServerRefTypeAdapter)

[`ServerTypeConfig`](#nemo_gym-config_types-ServerTypeConfig)

### API

```python
class nemo_gym.config_types.AgentServerRef()
```

**Bases:** `BaseModel`

```python
class nemo_gym.config_types.AggregateMetrics()
```

**Bases:** `BaseModel`

Response from /aggregate\_metrics.

Flat string keys for direct logging to W\&B/MLflow.

```python
class nemo_gym.config_types.AggregateMetricsRequest()
```

**Bases:** `BaseModel`

POST body for /aggregate\_metrics.

Each item is a stripped verify response dict containing at minimum:

* TASK\_INDEX\_KEY\_NAME: int
* "reward": float

```python
class nemo_gym.config_types.BaseNeMoGymCLIConfig()
```

**Bases:** `BaseModel`

```python
nemo_gym.config_types.BaseNeMoGymCLIConfig.pre_process(
    data
)
```

classmethod

```python
class nemo_gym.config_types.BaseRunServerConfig()
```

**Bases:** [BaseServerConfig](#nemo_gym-config_types-BaseServerConfig)

```python
class nemo_gym.config_types.BaseRunServerInstanceConfig()
```

**Bases:** [BaseRunServerConfig](#nemo_gym-config_types-BaseRunServerConfig)

```python
class nemo_gym.config_types.BaseRunServerTypeConfig()
```

**Bases:** [BaseRunServerConfig](#nemo_gym-config_types-BaseRunServerConfig)

```python
class nemo_gym.config_types.BaseServerConfig()
```

**Bases:** `BaseModel`

```python
class nemo_gym.config_types.BaseServerInstanceConfig()
```

**Bases:** [BaseServerTypeConfig](#nemo_gym-config_types-BaseServerTypeConfig)

```python
nemo_gym.config_types.BaseServerInstanceConfig.get_inner_run_server_config() -> nemo_gym.config_types.BaseRunServerTypeConfig
```

```python
nemo_gym.config_types.BaseServerInstanceConfig.get_inner_run_server_config_dict() -> omegaconf.DictConfig
```

```python
nemo_gym.config_types.BaseServerInstanceConfig.get_server_ref() -> nemo_gym.config_types.ServerRef
```

```python
nemo_gym.config_types.BaseServerInstanceConfig.validate_domain_for_resources_server() -> nemo_gym.config_types.BaseServerInstanceConfig
```

```python
class nemo_gym.config_types.BaseServerTypeConfig()
```

**Bases:** `BaseModel`

```python
class nemo_gym.config_types.BaseUploadJsonlDatasetHuggingFaceConfig()
```

**Bases:** [BaseNeMoGymCLIConfig](#nemo_gym-config_types-BaseNeMoGymCLIConfig)

Upload a JSONL dataset to HuggingFace Hub with automatic naming based on domain and resources server.

Examples:

```python
resource_config_path="resources_servers/example_multi_step/configs/example_multi_step.yaml"
ng_upload_dataset_to_hf         +dataset_name=my_dataset         +input_jsonl_fpath=data/train.jsonl         +resource_config_path=${resource_config_path}
```

```python
class nemo_gym.config_types.BenchmarkDatasetConfig()
```

**Bases:** `BaseModel`

```python
class nemo_gym.config_types.DatasetConfig()
```

**Bases:** `BaseModel`

```python
nemo_gym.config_types.DatasetConfig.check_train_validation_sets() -> nemo_gym.config_types.DatasetConfig
```

```python
class nemo_gym.config_types.DeleteJsonlDatasetGitlabConfig()
```

**Bases:** [BaseNeMoGymCLIConfig](#nemo_gym-config_types-BaseNeMoGymCLIConfig)

Delete a dataset from GitLab Model Registry (prompts for confirmation).

Examples:

```python
ng_delete_dataset_from_gitlab +dataset_name=old_dataset
```

```python
class nemo_gym.config_types.Domain
```

**Bases:** `enum.Enum`

```python
class nemo_gym.config_types.DownloadJsonlDatasetGitlabConfig()
```

**Bases:** [JsonlDatasetGitlabIdentifer](#nemo_gym-config_types-JsonlDatasetGitlabIdentifer), [BaseNeMoGymCLIConfig](#nemo_gym-config_types-BaseNeMoGymCLIConfig)

Download a JSONL dataset from GitLab Model Registry.

Examples:

```python
ng_download_dataset_from_gitlab         +dataset_name=example_multi_step         +version=0.0.1         +artifact_fpath=train.jsonl         +output_fpath=data/train.jsonl
```

```python
class nemo_gym.config_types.DownloadJsonlDatasetHuggingFaceConfig()
```

**Bases:** [JsonlDatasetHuggingFaceIdentifer](#nemo_gym-config_types-JsonlDatasetHuggingFaceIdentifer), [BaseNeMoGymCLIConfig](#nemo_gym-config_types-BaseNeMoGymCLIConfig)

Download a JSONL dataset from HuggingFace Hub to local filesystem.

Examples:

```python
ng_download_dataset_from_hf         +repo_id=NVIDIA/NeMo-Gym-Math-example_multi_step-v1         +artifact_fpath=train.jsonl         +output_fpath=data/train.jsonl
```

```python
nemo_gym.config_types.DownloadJsonlDatasetHuggingFaceConfig.check_output_path() -> nemo_gym.config_types.DownloadJsonlDatasetHuggingFaceConfig
```

```python
class nemo_gym.config_types.JsonlDatasetGitlabIdentifer()
```

**Bases:** `BaseModel`

```python
class nemo_gym.config_types.JsonlDatasetHuggingFaceIdentifer()
```

**Bases:** `BaseModel`

```python
class nemo_gym.config_types.ModelServerRef()
```

**Bases:** `BaseModel`

```python
class nemo_gym.config_types.ResourcesServerInstanceConfig()
```

**Bases:** [ResourcesServerTypeConfig](#nemo_gym-config_types-ResourcesServerTypeConfig), [BaseServerInstanceConfig](#nemo_gym-config_types-BaseServerInstanceConfig)

```python
class nemo_gym.config_types.ResourcesServerRef()
```

**Bases:** `BaseModel`

```python
class nemo_gym.config_types.ResourcesServerTypeConfig()
```

**Bases:** [BaseServerTypeConfig](#nemo_gym-config_types-BaseServerTypeConfig)

```python
class nemo_gym.config_types.ResponsesAPIAgentServerInstanceConfig()
```

**Bases:** [ResponsesAPIAgentServerTypeConfig](#nemo_gym-config_types-ResponsesAPIAgentServerTypeConfig), [BaseServerInstanceConfig](#nemo_gym-config_types-BaseServerInstanceConfig)

```python
class nemo_gym.config_types.ResponsesAPIAgentServerTypeConfig()
```

**Bases:** [BaseServerTypeConfig](#nemo_gym-config_types-BaseServerTypeConfig)

```python
class nemo_gym.config_types.ResponsesAPIModelServerInstanceConfig()
```

**Bases:** [ResponsesAPIModelServerTypeConfig](#nemo_gym-config_types-ResponsesAPIModelServerTypeConfig), [BaseServerInstanceConfig](#nemo_gym-config_types-BaseServerInstanceConfig)

```python
class nemo_gym.config_types.ResponsesAPIModelServerTypeConfig()
```

**Bases:** [BaseServerTypeConfig](#nemo_gym-config_types-BaseServerTypeConfig)

```python
class nemo_gym.config_types.UploadJsonlDatasetGitlabConfig()
```

**Bases:** [BaseNeMoGymCLIConfig](#nemo_gym-config_types-BaseNeMoGymCLIConfig)

Upload a local jsonl dataset artifact to Gitlab.

Examples:

```python
ng_upload_dataset_to_gitlab         +dataset_name=example_multi_step         +version=0.0.1         +input_jsonl_fpath=data/train.jsonl
```

```python
class nemo_gym.config_types.UploadJsonlDatasetHuggingFaceConfig()
```

**Bases:** [BaseUploadJsonlDatasetHuggingFaceConfig](#nemo_gym-config_types-BaseUploadJsonlDatasetHuggingFaceConfig)

Upload a JSONL dataset to HuggingFace Hub and automatically delete from GitLab after successful upload.

This command always deletes the dataset from GitLab after uploading to HuggingFace.
Use `ng_upload_dataset_to_hf` if you want optional deletion control.

Examples:

```python
resource_config_path="resources_servers/example_multi_step/configs/example_multi_step.yaml"
ng_gitlab_to_hf_dataset         +dataset_name=my_dataset         +input_jsonl_fpath=data/train.jsonl         +resource_config_path=${resource_config_path}
```

```python
nemo_gym.config_types.UploadJsonlDatasetHuggingFaceConfig.check_forbidden_fields(
    data
)
```

```python
class nemo_gym.config_types.UploadJsonlDatasetHuggingFaceMaybeDeleteConfig()
```

**Bases:** [BaseUploadJsonlDatasetHuggingFaceConfig](#nemo_gym-config_types-BaseUploadJsonlDatasetHuggingFaceConfig)

Upload a JSONL dataset to HuggingFace Hub with optional GitLab deletion after successful upload.

Examples:

```python
resource_config_path="resources_servers/example_multi_step/configs/example_multi_step.yaml"
ng_upload_dataset_to_hf         +dataset_name=my_dataset         +input_jsonl_fpath=data/train.jsonl         +resource_config_path=${resource_config_path}         +delete_from_gitlab=true
```

```python
class nemo_gym.config_types.WANDBConfig()
```

**Bases:** `BaseModel`

```python
nemo_gym.config_types.is_almost_server(
    server_type_config_dict: typing.Any
) -> bool
```

Detects if a config looks like a server but might fail validation.

```python
nemo_gym.config_types.is_server_ref(
    config_dict: omegaconf.DictConfig
) -> typing.Optional[nemo_gym.config_types.ServerRef]
```

```python
nemo_gym.config_types.maybe_get_server_instance_config(
    name: str,
    server_type_config_dict: typing.Any
) -> typing.Tuple[typing.Optional[nemo_gym.config_types.ServerInstanceConfig], typing.Optional[pydantic.ValidationError]]
```

Returns ServerInstanceConfig if a valid server, otherwise None with error details

```python
nemo_gym.config_types.AGENT_REF_KEY = 'agent_ref'
```

```python
nemo_gym.config_types.DatasetType = Union[Literal['train'], Literal['validation'], Literal['example']]
```

```python
nemo_gym.config_types.ServerInstanceConfig = Union[ResponsesAPIModelServerInstanceConfig, ResourcesServerInstanceConfig, Resp...
```

```python
nemo_gym.config_types.ServerInstanceConfigTypeAdapter = TypeAdapter(ServerInstanceConfig)
```

```python
nemo_gym.config_types.ServerRef = Union[ModelServerRef, ResourcesServerRef, AgentServerRef]
```

```python
nemo_gym.config_types.ServerRefTypeAdapter = TypeAdapter(ServerRef)
```

```python
nemo_gym.config_types.ServerTypeConfig = Union[ResponsesAPIModelServerTypeConfig, ResourcesServerTypeConfig, ResponsesAPI...
```