# data_handling.vin_store.format { #aria_nbv.data_handling.vin_store.format }
`data_handling.vin_store.format`
Typed manifest and index records for the VIN offline dataset format.
The new offline dataset format is an immutable indexed-shard layout optimized
for multi-worker random access. This module owns the normalized metadata
records shared by the writer and runtime dataset reader:
- the top-level dataset manifest,
- per-shard block descriptors, and
- sample-index records used for global random access and split membership.
## Classes
| Name | Description |
| --- | --- |
| [VinOfflineBlockSpec](#aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec) | Descriptor for one stored block inside a shard. |
| [VinOfflineIndexRecord](#aria_nbv.data_handling.vin_store.format.VinOfflineIndexRecord) | Global sample-index entry for VIN offline random access. |
| [VinOfflineManifest](#aria_nbv.data_handling.vin_store.format.VinOfflineManifest) | Top-level manifest for one immutable VIN offline dataset. |
| [VinOfflineMaterializedBlocks](#aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks) | Declare optional payload families present in a VIN offline store. |
| [VinOfflineShardSpec](#aria_nbv.data_handling.vin_store.format.VinOfflineShardSpec) | Descriptor for one immutable dataset shard. |
### VinOfflineBlockSpec { #aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec }
```python
data_handling.vin_store.format.VinOfflineBlockSpec(
name,
kind,
paths,
dtype=None,
shape=None,
optional=False,
)
```
Descriptor for one stored block inside a shard.
#### Attributes {.doc-section .doc-section-attributes}
| Name | Type | Description |
|----------|----------------------------------------|-------------------------------------------------------------------------|
| name | [str](`str`) | Logical block name, for example ``"vin.points_world"``. |
| kind | [str](`str`) | Storage kind such as ``"zarr_array"`` or ``"msgpack_indexed_records"``. |
| paths | [list](`list`)\[[str](`str`)\] | Relative array names or file paths that materialize the block. |
| dtype | [str](`str`) \| None | NumPy dtype name for numeric blocks. |
| shape | [list](`list`)\[[int](`int`)\] \| None | Full stored array shape for numeric blocks. |
| optional | [bool](`bool`) | Whether the block may be absent for some datasets. |
#### Methods
| Name | Description |
| --- | --- |
| [zarr_array_path](#aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.zarr_array_path) | Return the hierarchical Zarr path for a logical block name. |
| [msgpack_records_path](#aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.msgpack_records_path) | Return the msgpack filename used for one logical record block. |
| [msgpack_records_offsets_path](#aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.msgpack_records_offsets_path) | Return the offsets filename used for indexed record blocks. |
| [for_zarr_array](#aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.for_zarr_array) | Build a block descriptor for one Zarr-backed numeric array. |
| [for_indexed_msgpack_records](#aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.for_indexed_msgpack_records) | Build a block descriptor for indexed per-row MessagePack records. |
##### zarr_array_path { #aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.zarr_array_path }
```python
data_handling.vin_store.format.VinOfflineBlockSpec.zarr_array_path(name)
```
Return the hierarchical Zarr path for a logical block name.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|--------|--------------|-----------------------------------------------------|------------|
| name | [str](`str`) | Logical block name, for example ``"oracle.p3d.R"``. | _required_ |
###### Returns {.doc-section .doc-section-returns}
| Name | Type | Description |
|--------|--------------|---------------------------------------------|
| | [str](`str`) | Zarr array path relative to the shard root. |
##### msgpack_records_path { #aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.msgpack_records_path }
```python
data_handling.vin_store.format.VinOfflineBlockSpec.msgpack_records_path(name)
```
Return the msgpack filename used for one logical record block.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|--------|--------------|---------------------|------------|
| name | [str](`str`) | Logical block name. | _required_ |
###### Returns {.doc-section .doc-section-returns}
| Name | Type | Description |
|--------|--------------|-------------------------------|
| | [str](`str`) | Shard-local msgpack filename. |
##### msgpack_records_offsets_path { #aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.msgpack_records_offsets_path }
```python
data_handling.vin_store.format.VinOfflineBlockSpec.msgpack_records_offsets_path(
name,
)
```
Return the offsets filename used for indexed record blocks.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|--------|--------------|---------------------|------------|
| name | [str](`str`) | Logical block name. | _required_ |
###### Returns {.doc-section .doc-section-returns}
| Name | Type | Description |
|--------|--------------|-------------------------------------|
| | [str](`str`) | Shard-local NumPy offsets filename. |
##### for_zarr_array { #aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.for_zarr_array }
```python
data_handling.vin_store.format.VinOfflineBlockSpec.for_zarr_array(
name,
array_path,
dtype,
shape,
optional=False,
)
```
Build a block descriptor for one Zarr-backed numeric array.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|------------|--------------------------------|--------------------------------------------|------------|
| name | [str](`str`) | Logical block name. | _required_ |
| array_path | [str](`str`) | Relative Zarr array path inside the shard. | _required_ |
| dtype | [str](`str`) | Stored NumPy dtype name. | _required_ |
| shape | [list](`list`)\[[int](`int`)\] | Full stored array shape. | _required_ |
| optional | [bool](`bool`) | Whether the block is optional. | `False` |
###### Returns {.doc-section .doc-section-returns}
| Name | Type | Description |
|--------|-----------------------|----------------------------------------|
| | [Self](`typing.Self`) | Block descriptor for the stored array. |
##### for_indexed_msgpack_records { #aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec.for_indexed_msgpack_records }
```python
data_handling.vin_store.format.VinOfflineBlockSpec.for_indexed_msgpack_records(
name,
relative_payload_path,
relative_offsets_path,
num_records,
optional=True,
)
```
Build a block descriptor for indexed per-row MessagePack records.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|-----------------------|----------------|---------------------------------------------|------------|
| name | [str](`str`) | Logical block name. | _required_ |
| relative_payload_path | [str](`str`) | Shard-local concatenated payload blob path. | _required_ |
| relative_offsets_path | [str](`str`) | Shard-local NumPy offsets path. | _required_ |
| num_records | [int](`int`) | Number of stored per-row records. | _required_ |
| optional | [bool](`bool`) | Whether the block is optional. | `True` |
###### Returns {.doc-section .doc-section-returns}
| Name | Type | Description |
|--------|-----------------------|------------------------------------------------|
| | [Self](`typing.Self`) | Block descriptor for the indexed record block. |
### VinOfflineIndexRecord { #aria_nbv.data_handling.vin_store.format.VinOfflineIndexRecord }
```python
data_handling.vin_store.format.VinOfflineIndexRecord(
sample_index,
sample_key,
scene_id,
snippet_id,
split,
shard_id,
row,
)
```
Global sample-index entry for VIN offline random access.
#### Attributes {.doc-section .doc-section-attributes}
| Name | Type | Description |
|--------------|--------------|-------------------------------------------------------------|
| sample_index | [int](`int`) | Global zero-based sample index. |
| sample_key | [str](`str`) | Stable dataset sample key. |
| scene_id | [str](`str`) | ASE scene identifier. |
| snippet_id | [str](`str`) | ASE snippet identifier. |
| split | [str](`str`) | Canonical split membership: ``all``, ``train``, or ``val``. |
| shard_id | [str](`str`) | Shard that stores the sample. |
| row | [int](`int`) | Zero-based row offset inside the shard. |
#### Methods
| Name | Description |
| --- | --- |
| [read_many](#aria_nbv.data_handling.vin_store.format.VinOfflineIndexRecord.read_many) | Read the global sample index. |
| [write_many](#aria_nbv.data_handling.vin_store.format.VinOfflineIndexRecord.write_many) | Write the global sample index. |
##### read_many { #aria_nbv.data_handling.vin_store.format.VinOfflineIndexRecord.read_many }
```python
data_handling.vin_store.format.VinOfflineIndexRecord.read_many(path)
```
Read the global sample index.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|--------|------------------------|------------------------------|------------|
| path | [Path](`pathlib.Path`) | ``sample_index.jsonl`` path. | _required_ |
###### Returns {.doc-section .doc-section-returns}
| Name | Type | Description |
|--------|-----------------------------------------|------------------------------|
| | [list](`list`)\[[Self](`typing.Self`)\] | Parsed sample-index records. |
##### write_many { #aria_nbv.data_handling.vin_store.format.VinOfflineIndexRecord.write_many }
```python
data_handling.vin_store.format.VinOfflineIndexRecord.write_many(path, records)
```
Write the global sample index.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|---------|-----------------------------------------|------------------------------------------|------------|
| path | [Path](`pathlib.Path`) | Destination ``sample_index.jsonl`` path. | _required_ |
| records | [list](`list`)\[[Self](`typing.Self`)\] | Global sample-index records to persist. | _required_ |
### VinOfflineManifest { #aria_nbv.data_handling.vin_store.format.VinOfflineManifest }
```python
data_handling.vin_store.format.VinOfflineManifest(
version,
created_at,
source,
oracle,
vin,
materialized_blocks,
stats=dict(),
provenance=dict(),
shards=list(),
)
```
Top-level manifest for one immutable VIN offline dataset.
#### Attributes {.doc-section .doc-section-attributes}
| Name | Type | Description |
|---------------------|--------------------------------------------------------------------------------------------------------|------------------------------------------------------|
| version | [int](`int`) | Dataset-format version. |
| created_at | [str](`str`) | UTC creation timestamp. |
| source | [dict](`dict`)\[[str](`str`), [Any](`typing.Any`)\] | Raw dataset provenance and configuration snapshot. |
| oracle | [dict](`dict`)\[[str](`str`), [Any](`typing.Any`)\] | Oracle-label pipeline provenance and storage policy. |
| vin | [dict](`dict`)\[[str](`str`), [Any](`typing.Any`)\] | VIN-specific materialization settings. |
| materialized_blocks | [VinOfflineMaterializedBlocks](`aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks`) | Flags for optional stored blocks. |
| stats | [dict](`dict`)\[[str](`str`), [Any](`typing.Any`)\] | Aggregate dataset statistics. |
| provenance | [dict](`dict`)\[[str](`str`), [Any](`typing.Any`)\] | Writer provenance and build hints. |
| shards | [list](`list`)\[[VinOfflineShardSpec](`aria_nbv.data_handling.vin_store.format.VinOfflineShardSpec`)\] | Immutable shard descriptors. |
#### Methods
| Name | Description |
| --- | --- |
| [write](#aria_nbv.data_handling.vin_store.format.VinOfflineManifest.write) | Persist the manifest to disk. |
| [read](#aria_nbv.data_handling.vin_store.format.VinOfflineManifest.read) | Load a manifest from disk. |
##### write { #aria_nbv.data_handling.vin_store.format.VinOfflineManifest.write }
```python
data_handling.vin_store.format.VinOfflineManifest.write(path)
```
Persist the manifest to disk.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|--------|------------------------|----------------------------|------------|
| path | [Path](`pathlib.Path`) | Destination manifest path. | _required_ |
##### read { #aria_nbv.data_handling.vin_store.format.VinOfflineManifest.read }
```python
data_handling.vin_store.format.VinOfflineManifest.read(path)
```
Load a manifest from disk.
###### Parameters {.doc-section .doc-section-parameters}
| Name | Type | Description | Default |
|--------|------------------------|---------------------|------------|
| path | [Path](`pathlib.Path`) | Manifest JSON path. | _required_ |
###### Returns {.doc-section .doc-section-returns}
| Name | Type | Description |
|--------|------------------------|------------------------|
| | \'VinOfflineManifest\' | Deserialized manifest. |
### VinOfflineMaterializedBlocks { #aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks }
```python
data_handling.vin_store.format.VinOfflineMaterializedBlocks(
backbone,
depths,
candidate_pcs,
gt_obbs=False,
detected_obbs=False,
trajectory=False,
)
```
Declare optional payload families present in a VIN offline store.
The flags describe store-wide availability, while each shard's
:class:`VinOfflineBlockSpec` entries remain the authoritative physical
inventory. Backbone and detected-OBB blocks are actor-visible EVL evidence;
GT OBBs and candidate depths remain oracle supervision or diagnostics.
#### Attributes
| Name | Description |
| --- | --- |
| [backbone](#aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks.backbone) | Whether checkpoint-dependent EVL voxel/evidence outputs are materialized. |
| [depths](#aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks.depths) | Whether oracle-rendered candidate depth maps and validity masks are materialized. |
| [candidate_pcs](#aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks.candidate_pcs) | Whether oracle candidate point-cloud diagnostic records are materialized. |
| [gt_obbs](#aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks.gt_obbs) | Whether ASE GT OBB label/evaluation blocks are materialized. |
| [detected_obbs](#aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks.detected_obbs) | Whether actor-visible EVL detected-OBB blocks are materialized. |
| [trajectory](#aria_nbv.data_handling.vin_store.format.VinOfflineMaterializedBlocks.trajectory) | Whether MPS/EFM pose timestamps and world-frame gravity are materialized. |
### VinOfflineShardSpec { #aria_nbv.data_handling.vin_store.format.VinOfflineShardSpec }
```python
data_handling.vin_store.format.VinOfflineShardSpec(
shard_id,
relative_dir,
row_start,
num_rows,
blocks=dict(),
)
```
Descriptor for one immutable dataset shard.
#### Attributes {.doc-section .doc-section-attributes}
| Name | Type | Description |
|--------------|----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| shard_id | [str](`str`) | Stable shard identifier, for example ``"shard-000003"``. |
| relative_dir | [str](`str`) | Relative directory containing the shard files. |
| row_start | [int](`int`) | Global row offset covered by the shard. |
| num_rows | [int](`int`) | Number of samples stored in the shard. |
| blocks | [dict](`dict`)\[[str](`str`), [VinOfflineBlockSpec](`aria_nbv.data_handling.vin_store.format.VinOfflineBlockSpec`)\] | Stored block descriptors keyed by logical block name. |