# config

Python API: `luxonis_ml.nn_archive.config`

## Classes

| Name | Description |
| --- | --- |
|
[`Config`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/nn_archive/config.md)
| Configuration schema for an NN Archive. |

### class `Config`

```python
class Config(BaseModelExtraForbid)
```

Configuration schema for an NN Archive.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `config_version` | `str` | Schema version in `major.minor` format. |
| `model` | `Model` | Neural network configuration stored in the archive. |

Methods

| Name | Description |
| --- | --- |
|
[`validate_config_version_format`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/nn_archive/config.md)
| Validate that the schema version uses `major.minor` format. |

#### class method `validate_config_version_format`

```python
def validate_config_version_format(v: str) -> str
```

Validate that the schema version uses `major.minor` format.

> **Examples**
> ```pycon
>>> Config.validate_config_version_format("1.0")
'1.0'
>>> Config.validate_config_version_format("1")
Traceback (most recent call last):
...
ValueError: 'config_version' must be in format 'x.y' where x and y are integers
```

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `v` | `str` | Schema version string. | required |

Returns

| Type | Description |
| --- | --- |
| `str` | The validated schema version. |

Raises

| Type | Description |
| --- | --- |
| `ValueError` | If `v` is not in `major.minor` format, where both parts are integers. |

## Module Attributes

| Name | Type | Description |
| --- | --- | --- |
| [`CONFIG_VERSION`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/nn_archive/config.md) | `str` |  |

### constant `CONFIG_VERSION`

```python
CONFIG_VERSION: str = '1.0'
```
