pub struct ProvenanceGraph { /* private fields */ }Expand description
Complete provenance graph for tracking lineage
Implementations§
Source§impl ProvenanceGraph
impl ProvenanceGraph
Sourcepub fn add_dataset(&mut self, provenance: DatasetProvenance)
pub fn add_dataset(&mut self, provenance: DatasetProvenance)
Add a dataset provenance record
Sourcepub fn add_training(&mut self, provenance: TrainingProvenance)
pub fn add_training(&mut self, provenance: TrainingProvenance)
Add a training provenance record
Sourcepub fn get_dataset(&self, dataset_cid: &Cid) -> Option<&DatasetProvenance>
pub fn get_dataset(&self, dataset_cid: &Cid) -> Option<&DatasetProvenance>
Get dataset provenance
Sourcepub fn get_training(&self, model_cid: &Cid) -> Option<&TrainingProvenance>
pub fn get_training(&self, model_cid: &Cid) -> Option<&TrainingProvenance>
Get training provenance
Sourcepub fn trace_lineage(
&self,
model_cid: &Cid,
) -> Result<LineageTrace, ProvenanceError>
pub fn trace_lineage( &self, model_cid: &Cid, ) -> Result<LineageTrace, ProvenanceError>
Trace lineage backward from a model to all source datasets
Sourcepub fn get_all_attributions(
&self,
model_cid: &Cid,
) -> Result<Vec<Attribution>, ProvenanceError>
pub fn get_all_attributions( &self, model_cid: &Cid, ) -> Result<Vec<Attribution>, ProvenanceError>
Get all attributions for a model (including from datasets)
Sourcepub fn get_all_licenses(
&self,
model_cid: &Cid,
) -> Result<HashSet<License>, ProvenanceError>
pub fn get_all_licenses( &self, model_cid: &Cid, ) -> Result<HashSet<License>, ProvenanceError>
Get all licenses in the lineage
Sourcepub fn is_reproducible(&self, model_cid: &Cid) -> bool
pub fn is_reproducible(&self, model_cid: &Cid) -> bool
Check if lineage is reproducible (has all necessary metadata)
Trait Implementations§
Source§impl Clone for ProvenanceGraph
impl Clone for ProvenanceGraph
Source§fn clone(&self) -> ProvenanceGraph
fn clone(&self) -> ProvenanceGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProvenanceGraph
impl Debug for ProvenanceGraph
Auto Trait Implementations§
impl Freeze for ProvenanceGraph
impl RefUnwindSafe for ProvenanceGraph
impl Send for ProvenanceGraph
impl Sync for ProvenanceGraph
impl Unpin for ProvenanceGraph
impl UnwindSafe for ProvenanceGraph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more