pub struct CacheNamespace {Show 15 fields
pub schema_version: u32,
pub prediction_requirement_key: String,
pub data_requirement_key: String,
pub producer_node_id: NodeId,
pub source_port_name: String,
pub consumer_node_id: NodeId,
pub target_port_name: String,
pub phase: Phase,
pub params_fingerprint: String,
pub training_loss_fingerprint: Option<String>,
pub data_identity_fingerprint: String,
pub fold_id: FoldId,
pub trial_id: String,
pub seed: u64,
pub namespace_fingerprint: String,
}Expand description
Candidate-cache identity. Every field that can change predictions is part of the TCV1 namespace; a requirement key alone is deliberately insufficient.
Fields§
§schema_version: u32§prediction_requirement_key: String§data_requirement_key: String§producer_node_id: NodeId§source_port_name: String§consumer_node_id: NodeId§target_port_name: String§phase: Phase§params_fingerprint: String§training_loss_fingerprint: Option<String>§data_identity_fingerprint: String§fold_id: FoldId§trial_id: String§seed: u64§namespace_fingerprint: StringImplementations§
Source§impl CacheNamespace
impl CacheNamespace
pub fn new( prediction_requirement_key: String, data_requirement_key: String, producer_node_id: NodeId, source_port_name: String, consumer_node_id: NodeId, target_port_name: String, params_fingerprint: String, training_loss_fingerprint: Option<String>, data_identity_fingerprint: String, fold_id: FoldId, trial_id: String, seed: u64, ) -> Result<Self>
pub fn from_json(json: &str) -> Result<Self>
pub fn compute_fingerprint(&self) -> Result<String>
pub fn validate(&self) -> Result<()>
pub fn validate_for_identity( &self, identity: &TrainingDataIdentity, ) -> Result<()>
Trait Implementations§
Source§impl Clone for CacheNamespace
impl Clone for CacheNamespace
Source§fn clone(&self) -> CacheNamespace
fn clone(&self) -> CacheNamespace
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CacheNamespace
impl Debug for CacheNamespace
Source§impl<'de> Deserialize<'de> for CacheNamespace
impl<'de> Deserialize<'de> for CacheNamespace
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
impl Eq for CacheNamespace
Source§impl Ord for CacheNamespace
impl Ord for CacheNamespace
Source§fn cmp(&self, other: &CacheNamespace) -> Ordering
fn cmp(&self, other: &CacheNamespace) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CacheNamespace
impl PartialEq for CacheNamespace
Source§impl PartialOrd for CacheNamespace
impl PartialOrd for CacheNamespace
Source§impl Serialize for CacheNamespace
impl Serialize for CacheNamespace
impl StructuralPartialEq for CacheNamespace
Auto Trait Implementations§
impl Freeze for CacheNamespace
impl RefUnwindSafe for CacheNamespace
impl Send for CacheNamespace
impl Sync for CacheNamespace
impl Unpin for CacheNamespace
impl UnsafeUnpin for CacheNamespace
impl UnwindSafe for CacheNamespace
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.