# metadata

Python API: `hubai_sdk.utils.metadata`

Read tensor shapes and element types from supported model files.

## Classes

### Metadata

Input and output tensor metadata extracted from a model.

#### Attributes

##### input_dtypes

Input element types keyed by tensor name.

##### input_shapes

Input shapes keyed by tensor name.

##### output_dtypes

Output element types keyed by tensor name.

##### output_shapes

Output shapes keyed by tensor name.

## Functions

### get_metadata

```python
def get_metadata(model_path: Path) -> Metadata:
```

Extract input and output metadata from a supported model file.

Parameters

 * `model_path` (`Path`): Path to an ONNX, OpenVINO IR, or TFLite model.

Returns

 * `Metadata`: Input and output shapes and dtypes for the model.

Raises

 * `ValueError`: If the model format is unsupported.
