Manifest
timenet.manifest ¶source
The dataset manifest: a frozen :class:Manifest and its JSON codec.
FilePart
dataclass
¶source
One data file of a dataset version. It has a path, a checksum, and a byte size in one record.
The path, checksum, and size stay together in one record. A reader does not need to join a file to its digest across two structures. A consumer can verify integrity and plan a download from the manifest alone.
Manifest
dataclass
¶source
The single source of truth a consumer reads to interpret a dataset version.
Raises:
| Type | Description |
|---|---|
TimeNetInvalidManifestError
|
If |
build_env
class-attribute
instance-attribute
¶source
The Python version and package set that produced this version.
Provenance only: nothing reads it to interpret the data. It is here so a builder can answer what produced a dataset version without re-deriving it from a build log.
counts
class-attribute
instance-attribute
¶source
counts: ManifestCounts = field(
default_factory=ManifestCounts
)
Row and entity counts recorded for quick inspection.
dataset_id
instance-attribute
¶source
dataset_id: str
A denormalized copy of metadata.dataset_id. A reader can get the id without parsing metadata.
files
instance-attribute
¶source
files: ManifestFiles
Descriptor (path, checksum, size) for every data artifact, grouped by kind.
metadata
instance-attribute
¶source
metadata: DatasetMetadata
Descriptive identity of the dataset (name, version, license, domains, tags).
schema
class-attribute
instance-attribute
¶source
schema: DatasetSchema = field(default_factory=DatasetSchema)
Structural schema: time-series specs, annotations, and tasks.
timef_format_version
class-attribute
instance-attribute
¶source
timef_format_version: int = 1
The TimeF manifest format version. The value must be in SUPPORTED_FORMAT_VERSIONS.
value_encoding
class-attribute
instance-attribute
¶source
spec_type -> the values-column encoding that its shards carry.
This field exists only for provenance. Parquet already records the applied encoding in each file's footer, so a reader does not need this field. The field lets a builder see what a build chose without opening a shard. The field is empty for a backend with no such choice.
values_backend
class-attribute
instance-attribute
¶source
values_backend: str = ValuesBackend.PARQUET
Storage backend for the time-series values plane.
from_dict
classmethod
¶source
Parse a manifest dict. Allow missing optional blocks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, Any]
|
The manifest dict, for example the output of |
required |
Returns:
| Type | Description |
|---|---|
Manifest
|
The parsed :class: |
Raises:
| Type | Description |
|---|---|
TimeNetInvalidManifestError
|
If a required key is missing or a block is invalid. |
from_json
classmethod
¶source
Parse a manifest from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
The JSON text. |
required |
Returns:
| Type | Description |
|---|---|
Manifest
|
The parsed :class: |
Raises:
| Type | Description |
|---|---|
TimeNetInvalidManifestError
|
If the text is not valid JSON or a block is invalid. |
ManifestCounts
dataclass
¶source
Row/entity counts recorded in the manifest for quick inspection without opening the parquet.
annotations
class-attribute
instance-attribute
¶source
annotations: int = 0
Number of unique annotation ids across all records.
records
class-attribute
instance-attribute
¶source
records: int = 0
Total number of records in the dataset.
registered_annotations
class-attribute
instance-attribute
¶source
registered_annotations: int = 0
Number of task-referenced annotations that no record carries. Lets the reader skip the annotation scan that recovers them when there are none.
time_series_chunks
class-attribute
instance-attribute
¶source
time_series_chunks: int = 0
Number of time series chunk placements written to parquet.
ManifestFiles
dataclass
¶source
Descriptors for every artifact of a dataset version, grouped by kind. Readers use this data, not a glob.
Each artifact is a list of parts. This lets any artifact shard later without a change to the
manifest format. Today the writer creates one part for records, annotations, and
time_series_index. tasks and time_series already have several parts. Each part is a
:class:FilePart object, with its own path, checksum, and size.
tasks
class-attribute
instance-attribute
¶source
Parts of the task tables. There is one table for each task type.
time_series
class-attribute
instance-attribute
¶source
Parts of the time series data. Each part is also a shard.