# nn_archive

Python API: `hubai_sdk.utils.nn_archive`

## Functions

| Name | Description |
| --- | --- |
|
[`cleanup_extracted_path`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/nn_archive.md)
| Delete an extracted NN archive path if it exists. |
|
[`process_nn_archive`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/nn_archive.md)
| Extracts the archive from tar and parses its config. |

### function `cleanup_extracted_path`

```python
def cleanup_extracted_path(path: Path)
```

Delete an extracted NN archive path if it exists.

### function `process_nn_archive`

```python
def process_nn_archive(
    path: Path,
    overrides: dict[str, Any] | None,
) -> tuple[Config, NNArchiveConfig, str]
```

Extracts the archive from tar and parses its config.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `path` | `Path` | Path to the archive. | required |
| `overrides` | `dict[str, Any] | None` | Config overrides. | required |

Returns

| Type | Description |
| --- | --- |
| `tuple[Config, NNArchiveConfig, str]` | The parsed configuration, NN Archive configuration, and main stage key. |
