dataeval.types.MetadataJson

class dataeval.types.MetadataJson

Top-level schema for a metadata.json sidecar file.

A single file may carry a dataset block, a model block, or both — e.g. a model fine-tuned on a specific dataset can be described in one file. The provenance field reuses ExecutionMetadata so an evaluator can stamp the file with its own output.meta() record.

schema_version

Schema version this document conforms to. Defaults to SCHEMA_VERSION.

Type:

str

provenance

Provenance record for the producing entity. Defaults to a record built at construction time for dataeval.types.MetadataJson.

Type:

ExecutionMetadata

dataset

Dataset description, when applicable.

Type:

DatasetInfo or None

model

Model description, when applicable.

Type:

ModelInfo or None

extractor

Feature extractor description, when applicable. An extractor may or may not be tied to a model (FlattenExtractor has none), so this is a sibling of model rather than nested under it.

Type:

ExtractorInfo or None

extra

Free-form bag for tool-specific fields outside the core schema.

Type:

dict

Examples

>>> from dataeval.types import DatasetInfo, MetadataJson
>>> doc = MetadataJson(dataset=DatasetInfo(name="my-ds"))
>>> doc.model_dump_json()
>>> restored = MetadataJson.model_validate_json(payload)