pub struct DatasetManifest {
pub schema: String,
pub name: String,
pub provenance: DatasetProvenance,
pub adapter: AdapterRef,
pub cases: Vec<DatasetCase>,
}Fields§
§schema: String§name: String§provenance: DatasetProvenanceSynthetic provenance always prevents empirical quality claims (R-04).
adapter: AdapterRefThe task adapter whose label shape the cases use.
cases: Vec<DatasetCase>Implementations§
Source§impl DatasetManifest
impl DatasetManifest
Sourcepub fn check_structure(&self) -> Result<(), DatasetError>
pub fn check_structure(&self) -> Result<(), DatasetError>
Validate everything but label shape: schema, cases, provenance, unique ids and leakage across splits.
Sourcepub fn check(
&self,
adapter: &AdapterRef,
check_label: impl Fn(&str) -> Result<(), String>,
) -> Result<(), DatasetError>
pub fn check( &self, adapter: &AdapterRef, check_label: impl Fn(&str) -> Result<(), String>, ) -> Result<(), DatasetError>
Validate the manifest; check_label is the named adapter’s label
shape check.
Sourcepub fn split(&self, split: Split) -> impl Iterator<Item = &DatasetCase>
pub fn split(&self, split: Split) -> impl Iterator<Item = &DatasetCase>
The cases of one split, in manifest order.
Trait Implementations§
Source§impl Clone for DatasetManifest
impl Clone for DatasetManifest
Source§impl Debug for DatasetManifest
impl Debug for DatasetManifest
Source§impl<'de> Deserialize<'de> for DatasetManifest
impl<'de> Deserialize<'de> for DatasetManifest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Document for DatasetManifest
Either version parses; SCHEMA names version 1 only because the trait
holds one constant. The identity is tagged with the document’s own
schema, so a version 1 identity is what it always was.
impl Document for DatasetManifest
Either version parses; SCHEMA names version 1 only because the trait
holds one constant. The identity is tagged with the document’s own
schema, so a version 1 identity is what it always was.
Source§const SCHEMA: &'static str = DATASET
const SCHEMA: &'static str = DATASET
The schema string this document carries (spec 002, 3.2.1).
Source§const LIMITS: ParseLimits = REPLAY_V1
const LIMITS: ParseLimits = REPLAY_V1
The limit set its bytes are scanned against (spec 002, 3.2.5).
Source§fn parse(bytes: &[u8]) -> Result<Self, DocumentError>
fn parse(bytes: &[u8]) -> Result<Self, DocumentError>
Scan, deserialize and check the schema string.
Source§fn record_digest(&self) -> Result<ContentDigest, CanonicalError>
fn record_digest(&self) -> Result<ContentDigest, CanonicalError>
sha256(SCHEMA || 0x00 || record canonical bytes) (spec 004, 3.1.6).
Equal to the identity of an identified document.Source§fn record_canonical(&self) -> Result<Vec<u8>, CanonicalError>where
Self: PartialEq,
fn record_canonical(&self) -> Result<Vec<u8>, CanonicalError>where
Self: PartialEq,
The record canonical bytes (spec 004, 5.6): the canonical bytes, with
finite fractional numbers written in shortest round-trip form.
impl Eq for DatasetManifest
Source§impl Identified for DatasetManifest
impl Identified for DatasetManifest
Source§impl PartialEq for DatasetManifest
impl PartialEq for DatasetManifest
Source§impl Serialize for DatasetManifest
impl Serialize for DatasetManifest
impl StructuralPartialEq for DatasetManifest
Auto Trait Implementations§
impl Freeze for DatasetManifest
impl RefUnwindSafe for DatasetManifest
impl Send for DatasetManifest
impl Sync for DatasetManifest
impl Unpin for DatasetManifest
impl UnsafeUnpin for DatasetManifest
impl UnwindSafe for DatasetManifest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more