pub struct PortableRefitRecipe {Show 13 fields
pub schema_version: u32,
pub recipe_id: String,
pub mode: PortableRefitMode,
pub parent_package_fingerprint: String,
pub parent_outcome: TrainingOutcomeRef,
pub effective_plan_fingerprint: String,
pub selected_variant_id: VariantId,
pub selected_variant_fingerprint: String,
pub selected_parameter_projection_fingerprint: String,
pub target_binding_fingerprints: Vec<String>,
pub target_schema_fingerprint: String,
pub controllers: Vec<PortableRefitController>,
pub recipe_fingerprint: String,
}Expand description
Closed, DAG-ML-owned evidence required to create an Archive/Package V3 full-refit descendant. It deliberately contains no cohort data and no fitted handle: the target-bound cohort and new artifacts belong to the subsequent V3 operation.
Fields§
§schema_version: u32§recipe_id: String§mode: PortableRefitMode§parent_package_fingerprint: String§parent_outcome: TrainingOutcomeRef§effective_plan_fingerprint: String§selected_variant_id: VariantId§selected_variant_fingerprint: String§selected_parameter_projection_fingerprint: String§target_binding_fingerprints: Vec<String>§target_schema_fingerprint: String§controllers: Vec<PortableRefitController>§recipe_fingerprint: StringImplementations§
Source§impl PortableRefitRecipe
impl PortableRefitRecipe
pub fn compute_fingerprint(&self) -> Result<String, DagMlError>
pub fn from_json(json: &str) -> Result<PortableRefitRecipe, DagMlError>
pub fn validate(&self) -> Result<(), DagMlError>
Sourcepub fn derive_from_package(
package: &PortablePredictorPackage,
recipe_id: impl Into<String>,
) -> Result<PortableRefitRecipe, DagMlError>
pub fn derive_from_package( package: &PortablePredictorPackage, recipe_id: impl Into<String>, ) -> Result<PortableRefitRecipe, DagMlError>
Derive a closed future-V3 full-refit recipe from a portable predictor package. This does not execute a refit and intentionally does not make Package V2 retrainable: a V3 request still needs a fresh, target-bound cohort and its own scheduler entry point.
Sourcepub fn validate_against_source_package(
&self,
package: &PortablePredictorPackage,
) -> Result<(), DagMlError>
pub fn validate_against_source_package( &self, package: &PortablePredictorPackage, ) -> Result<(), DagMlError>
Refuse a recipe unless it is the exact deterministic projection of its source package. Future Archive V3 executors call this before they ask a provider for a target cohort, so an attacker cannot transplant a valid recipe onto another package by re-signing only the outer object.
Trait Implementations§
Source§impl Clone for PortableRefitRecipe
impl Clone for PortableRefitRecipe
Source§fn clone(&self) -> PortableRefitRecipe
fn clone(&self) -> PortableRefitRecipe
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PortableRefitRecipe
impl Debug for PortableRefitRecipe
Source§impl<'de> Deserialize<'de> for PortableRefitRecipe
impl<'de> Deserialize<'de> for PortableRefitRecipe
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PortableRefitRecipe, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PortableRefitRecipe, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for PortableRefitRecipe
Source§impl PartialEq for PortableRefitRecipe
impl PartialEq for PortableRefitRecipe
Source§impl Serialize for PortableRefitRecipe
impl Serialize for PortableRefitRecipe
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for PortableRefitRecipe
Auto Trait Implementations§
impl Freeze for PortableRefitRecipe
impl RefUnwindSafe for PortableRefitRecipe
impl Send for PortableRefitRecipe
impl Sync for PortableRefitRecipe
impl Unpin for PortableRefitRecipe
impl UnsafeUnpin for PortableRefitRecipe
impl UnwindSafe for PortableRefitRecipe
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.