Expand description
The attested, profile-parameterized dataset a consumer must present before canonical splits are exposed.
Implemented by plan 02-06. The attested, profile-parameterized dataset a consumer must present before canonical splits are exposed.
The profile is a TYPE PARAMETER, not a runtime field: PreparedDataset<Canonical> and
PreparedDataset<Compatibility> are distinct types with distinct constructors, and
only the canonical one exposes a validation witness. Selection consumes
&PreparedDataset<Canonical>, so a compatibility dataset cannot be passed at all —
which is what makes DATA-06’s “cannot be constructed” provable by trybuild rather
than merely rejected at runtime.
§PreparedDataset<Compatibility> has no validation_witness method
A compatibility-profile selection run is not rejected at runtime. It does not
compile. There is no value of type PreparedDataset<Compatibility> that can be
passed where &PreparedDataset<Canonical> is expected, and there is no
validation_witness to call on it — rustc reports “no method named”, which is a
non-compiling program rather than an error value a caller could ignore.
The profile also selects which splits EXIST, through [DatasetProfile::Splits]. That
is stronger than an optional field: a compatibility dataset does not merely leave its
validation split empty, it has no place to put one (D-19).
§This is where the typestate meets the hashes
hash.rs is a leaf that knows nothing about split roles. The constructors here are the
single point of assembly: they build one SplitFingerprintInput per split from that
split’s own accessors, hand them to DatasetFingerprint::compute in ascending role
order, and build the witness’s SplitFingerprint from the SAME per-split value that
went into the dataset input. That shared value is what makes the two digests provably
describe the same bytes under different domain tags.
Structs§
- Canonical
- The canonical three-split profile: train, validation, test.
- Canonical
Declarations - Per-split declarations for the canonical profile.
- Canonical
Splits - The canonical profile’s splits.
- Compatibility
- The merged SetFit compatibility profile: train and a compatibility test split, and NO validation split at all (D-19).
- Compatibility
Declarations - Per-split declarations for the compatibility profile.
- Compatibility
Splits - The compatibility profile’s splits. There is no validation field.
- Prepared
Dataset - A validated, fingerprinted dataset of exactly one profile.
- Prepared
Jsonl - Canonical JSONL bytes for every split of a prepared dataset, keyed by role.
- Validation
Witness - An opaque proof that a canonical validation split exists in THIS dataset.
Traits§
- Dataset
Profile - A dataset profile. Implemented only by
CanonicalandCompatibility.