1 VinOfflineBlockSpec
data_handling._offline_format.VinOfflineBlockSpec(
name,
kind,
paths,
dtype=None,
shape=None,
optional=False,
)Descriptor for one stored block inside a shard.
1.1 Attributes
| Name | Type | Description |
|---|---|---|
| name | str | Logical block name, for example "vin.points_world". |
| kind | str | Storage kind such as "zarr_array" or "msgpack_indexed_records". |
| paths | list[str] | Relative array names or file paths that materialize the block. |
| dtype | str | None | NumPy dtype name for numeric blocks. |
| shape | list[int] | None | Full stored array shape for numeric blocks. |
| optional | bool | Whether the block may be absent for some datasets. |
1.2 Methods
| Name | Description |
|---|---|
| zarr_array_path | Return the hierarchical Zarr path for a logical block name. |
| msgpack_records_path | Return the msgpack filename used for one logical record block. |
| msgpack_records_offsets_path | Return the offsets filename used for indexed record blocks. |
| for_zarr_array | Build a block descriptor for one Zarr-backed numeric array. |
| for_indexed_msgpack_records | Build a block descriptor for indexed per-row MessagePack records. |
1.2.1 zarr_array_path
data_handling._offline_format.VinOfflineBlockSpec.zarr_array_path(name)Return the hierarchical Zarr path for a logical block name.
1.2.1.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | Logical block name, for example "oracle.p3d.R". |
required |
1.2.1.2 Returns
| Name | Type | Description |
|---|---|---|
| str | Zarr array path relative to the shard root. |
1.2.2 msgpack_records_path
data_handling._offline_format.VinOfflineBlockSpec.msgpack_records_path(name)Return the msgpack filename used for one logical record block.
1.2.2.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | Logical block name. | required |
1.2.2.2 Returns
| Name | Type | Description |
|---|---|---|
| str | Shard-local msgpack filename. |
1.2.3 msgpack_records_offsets_path
data_handling._offline_format.VinOfflineBlockSpec.msgpack_records_offsets_path(
name,
)Return the offsets filename used for indexed record blocks.
1.2.3.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | Logical block name. | required |
1.2.3.2 Returns
| Name | Type | Description |
|---|---|---|
| str | Shard-local NumPy offsets filename. |
1.2.4 for_zarr_array
data_handling._offline_format.VinOfflineBlockSpec.for_zarr_array(
name,
array_path,
dtype,
shape,
optional=False,
)Build a block descriptor for one Zarr-backed numeric array.
1.2.4.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | Logical block name. | required |
| array_path | str | Relative Zarr array path inside the shard. | required |
| dtype | str | Stored NumPy dtype name. | required |
| shape | list[int] | Full stored array shape. | required |
| optional | bool | Whether the block is optional. | False |
1.2.4.2 Returns
| Name | Type | Description |
|---|---|---|
| Self | Block descriptor for the stored array. |
1.2.5 for_indexed_msgpack_records
data_handling._offline_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.
1.2.5.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | Logical block name. | required |
| relative_payload_path | str | Shard-local concatenated payload blob path. | required |
| relative_offsets_path | str | Shard-local NumPy offsets path. | required |
| num_records | int | Number of stored per-row records. | required |
| optional | bool | Whether the block is optional. | True |
1.2.5.2 Returns
| Name | Type | Description |
|---|---|---|
| Self | Block descriptor for the indexed record block. |