Skip to content

Manifest

timenet.manifest source

The dataset manifest: a frozen :class:Manifest and its JSON codec.

Manifest dataclass source

The single source of truth a consumer reads to interpret a dataset version.

Raises:

Type Description
InvalidManifestError

If timef_format_version is not a supported version.

SUPPORTED_FORMAT_VERSIONS class-attribute source

SUPPORTED_FORMAT_VERSIONS: frozenset[int] = frozenset({1})

checksums class-attribute instance-attribute source

checksums: dict[str, str] = field(default_factory=dict)

Per-file checksums keyed by relative path, each sha256: prefixed.

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

Denormalized copy of metadata.dataset_id, readable without parsing metadata.

derived_from class-attribute instance-attribute source

derived_from: dict[str, str] | None = None

Copy-on-write lineage (base version + operation), or None for a freshly built version.

files instance-attribute source

Relative paths to every data artifact, grouped by kind.

id_encoding class-attribute instance-attribute source

id_encoding: dict[str, str] = field(default_factory=dict)

Logical id -> "uuid16" for ids stored as binary(16); absent entries are strings.

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, data sources, annotations, and tasks.

timef_format_version class-attribute instance-attribute source

timef_format_version: int = 1

TimeF manifest format version; must be in SUPPORTED_FORMAT_VERSIONS.

from_dict classmethod source

from_dict(data: dict[str, Any]) -> Manifest

Parse a manifest dict, tolerating missing optional blocks.

Parameters:

Name Type Description Default
data dict[str, Any]

The manifest dict (e.g. from json.loads).

required

Returns:

Type Description
Manifest

The parsed :class:Manifest.

Raises:

Type Description
InvalidManifestError

If a required key is missing or a block is malformed.

from_json classmethod source

from_json(text: str) -> Manifest

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:Manifest.

Raises:

Type Description
InvalidManifestError

If the text is not valid JSON or a block is malformed.

to_dict source

to_dict() -> dict[str, Any]

Serialize the manifest to a JSON-compatible dict with all keys present.

Returns:

Type Description
dict[str, Any]

The canonical dict form.

to_json source

to_json() -> str

Serialize the manifest to a pretty JSON string.

Returns:

Type Description
str

The JSON text.

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 samples.

samples class-attribute instance-attribute source

samples: int = 0

Total number of samples in the dataset.

tasks class-attribute instance-attribute source

tasks: dict[str, int] = field(default_factory=dict)

Count of tasks keyed by task type.

time_series_chunks class-attribute instance-attribute source

time_series_chunks: int = 0

Number of time series chunk placements written to parquet.

time_series_index_rows class-attribute instance-attribute source

time_series_index_rows: int = 0

Number of rows in the time series index.

time_series_specs class-attribute instance-attribute source

time_series_specs: dict[str, int] = field(
    default_factory=dict
)

Count of unique time series keyed by spec type.

ManifestFiles dataclass source

Relative paths to every artifact of a dataset version. Readers use this list, not a glob.

Every artifact is a list of parts, so any of them can shard later without a manifest-format change. Today the writer emits a single part for samples / annotations / time_series_index; tasks and time_series already carry several.

annotations instance-attribute source

annotations: tuple[str, ...]

Relative path parts of the annotations table.

samples instance-attribute source

samples: tuple[str, ...]

Relative path parts of the samples table.

tasks class-attribute instance-attribute source

tasks: tuple[str, ...] = ()

Relative path parts of the task tables, one per task type.

time_series class-attribute instance-attribute source

time_series: tuple[str, ...] = ()

Relative path parts (shards) of the time series data.

time_series_index instance-attribute source

time_series_index: tuple[str, ...]

Relative path parts of the time series index table.

all_parts source

all_parts() -> tuple[str, ...]

Return every file part across all artifacts, in a stable order.

Returns:

Type Description
str

The concatenation of the samples, annotations, time_series_index, tasks,

...

and time_series parts.