dataeval.data.Conformer¶
- class dataeval.data.Conformer¶
Base class for a per-datum conformation applied by
Conform.A conformer rewrites the content of a dataset to make it conform to a target schema — relabeling to a reference vocabulary now; renaming metadata factors, converting metadata values, or mutating image/video later. Subclasses override:
conform_metadata()— transform dataset-level metadata (e.g. replaceindex2label); called once at construction.keeps()— a cheap predicate deciding whether a datum survives; scanned once at construction to fix the conformed dataset’s length.conform_datum()— transform a single datum; applied lazily on access.
Subclasses that read the target of each datum should set
requiresto declare the MAITE datum shape they need;Conformaggregates these and validates the source dataset once, upfront, raisingMaiteShapeErrorbefore any datum is conformed.