> For clean Markdown content of this page, append .md to this URL.

# aitune.torch.module.exact_sample_metadata

Exact sample metadata for matching tensor shapes.

## Module Contents

### Classes

| Name                                                                                    | Description                                                                            |
| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [`ExactSampleMetadata`](#aitune-torch-module-exact_sample_metadata-ExactSampleMetadata) | Contrary to SampleMetadata, ExactSampleMetadata requires exact tensor shapes to match. |

### API

```python
class aitune.torch.module.exact_sample_metadata.ExactSampleMetadata()
```

**Bases:** [SampleMetadata](/aitune/aitune/torch/module/sample_metadata#aitune-torch-module-sample_metadata-SampleMetadata)

Contrary to SampleMetadata, ExactSampleMetadata requires exact tensor shapes to match.

This is useful for recording inputs and bucketing data by tensor shapes. This class has only one factory function: from\_inputs
and defines equality and hash based on locator and tensor shapes.

```python
aitune.torch.module.exact_sample_metadata.ExactSampleMetadata.__eq__(
    __value: object
) -> bool
```

Equality operator.

```python
aitune.torch.module.exact_sample_metadata.ExactSampleMetadata.__hash__() -> int
```

Compute hash of sample metadata.

```python
aitune.torch.module.exact_sample_metadata.ExactSampleMetadata.from_inputs(
    inputs: dict[str, typing.Any]
) -> aitune.torch.module.exact_sample_metadata.ExactSampleMetadata
```

staticmethod

Create ExactSampleMetadata from inputs keyed by forward parameter name.