pub struct CanonicalDeclarations {
pub train: SplitDeclaration,
pub validation: SplitDeclaration,
pub test: SplitDeclaration,
pub label_names: Vec<String>,
}Expand description
Per-split declarations for the canonical profile.
Fields§
§train: SplitDeclarationDeclaration for the training split.
validation: SplitDeclarationDeclaration for the validation split.
test: SplitDeclarationDeclaration for the test split.
label_names: Vec<String>The shared label map.
Implementations§
Source§impl CanonicalDeclarations
impl CanonicalDeclarations
Sourcepub fn check_label_maps_agree(&self) -> Result<(), ContrastiveDataError>
pub fn check_label_maps_agree(&self) -> Result<(), ContrastiveDataError>
Refuse a declaration whose per-split label maps disagree with the shared one.
Rows are validated against train/validation/test’s own label_names, but it
is self.label_names that reaches the dataset fingerprint, the stored map and
SelectionPayload::label_names. Without this check the two can disagree, every
row still validates, and Selection::replay still passes — because replay compares
the payload against the same divergent map. The manifest then commits a label map
that contradicts the rows it describes, silently.
§Errors
ContrastiveDataError::DeclaredLabelMapMismatch naming the first split that
diverges, in declaration order.