pub struct WeightMaterializerRegistry { /* private fields */ }Expand description
Process-local registry retaining the exact implementations authorized to transform checkpoint schemas. It is deliberately neither serializable nor reconstructible from a capability catalog.
Implementations§
Source§impl WeightMaterializerRegistry
impl WeightMaterializerRegistry
pub fn new( materializers: Vec<Box<dyn WeightMaterializer>>, ) -> Result<Self, VNextError>
pub fn identity_only() -> Result<Self, VNextError>
Sourcepub fn augment_catalog(
&self,
catalog: CapabilityCatalog,
) -> Result<CapabilityCatalog, VNextError>
pub fn augment_catalog( &self, catalog: CapabilityCatalog, ) -> Result<CapabilityCatalog, VNextError>
Extends a capability catalog with descriptors from these exact process-local implementation objects.
Sourcepub fn select_exact(
&self,
family: &PreparedModelFamily,
catalog: &CapabilityCatalog,
materializer_id: &WeightMaterializerId,
) -> Result<TrustedExecutionWeightPlan, VNextError>
pub fn select_exact( &self, family: &PreparedModelFamily, catalog: &CapabilityCatalog, materializer_id: &WeightMaterializerId, ) -> Result<TrustedExecutionWeightPlan, VNextError>
Invokes the selected trusted implementation and returns a witness that
cannot be forged by deserializing an ExecutionWeightPlan.
Selects a materializer that is value-preserving by contract.
Approximate transforms require a future typed quality approval carrying checked-in numerical-tolerance evidence. Keeping that authority out of this entrypoint prevents a build feature or backend capability from silently changing checkpoint precision.
Sourcepub fn select(
&self,
family: &PreparedModelFamily,
catalog: &CapabilityCatalog,
selection: &WeightMaterializerSelection,
) -> Result<TrustedExecutionWeightPlan, VNextError>
pub fn select( &self, family: &PreparedModelFamily, catalog: &CapabilityCatalog, selection: &WeightMaterializerSelection, ) -> Result<TrustedExecutionWeightPlan, VNextError>
Selects either an exact materializer or an approximate materializer carrying strict, crate-verified numeric artifact bytes.