pub trait ModelConfigurationResolver {
type ArtifactPlan: Clone + Debug;
// Required methods
fn resolve_safetensors(
&self,
json: &Value,
) -> Result<ResolvedModelConfiguration<Self::ArtifactPlan>, ArtifactError>;
fn resolve_gguf(
&self,
architecture: &str,
checkpoint: &GgufCheckpoint,
) -> Result<ResolvedModelConfiguration<Self::ArtifactPlan>, ArtifactError>;
fn gguf_companion_requirements(
&self,
architecture: &str,
checkpoint: &GgufCheckpoint,
) -> Result<Vec<GgufCompanionRequirement>, ArtifactError>;
// Provided method
fn artifact_plan(
&self,
_path: &Path,
_format: ArtifactFormat,
_configuration: &ModelConfiguration,
_tensors: &TensorCatalog,
_validated_gguf: Option<&ValidatedGguf>,
resolved_plan: Self::ArtifactPlan,
) -> Result<Self::ArtifactPlan, ArtifactError> { ... }
}Expand description
Architecture-owned resolver used by neutral artifact inspection.
Core owns the transport contract but deliberately does not recognize model family aliases, GGUF architecture spellings, or nested configuration wrappers.
Required Associated Types§
Sourcetype ArtifactPlan: Clone + Debug
type ArtifactPlan: Clone + Debug
Architecture-owned state retained from artifact inspection through materialization.
Required Methods§
Sourcefn resolve_safetensors(
&self,
json: &Value,
) -> Result<ResolvedModelConfiguration<Self::ArtifactPlan>, ArtifactError>
fn resolve_safetensors( &self, json: &Value, ) -> Result<ResolvedModelConfiguration<Self::ArtifactPlan>, ArtifactError>
Resolves one Hugging Face config.json value to its canonical family.
Sourcefn resolve_gguf(
&self,
architecture: &str,
checkpoint: &GgufCheckpoint,
) -> Result<ResolvedModelConfiguration<Self::ArtifactPlan>, ArtifactError>
fn resolve_gguf( &self, architecture: &str, checkpoint: &GgufCheckpoint, ) -> Result<ResolvedModelConfiguration<Self::ArtifactPlan>, ArtifactError>
Resolves and structurally admits one GGUF architecture and checkpoint.
Sourcefn gguf_companion_requirements(
&self,
architecture: &str,
checkpoint: &GgufCheckpoint,
) -> Result<Vec<GgufCompanionRequirement>, ArtifactError>
fn gguf_companion_requirements( &self, architecture: &str, checkpoint: &GgufCheckpoint, ) -> Result<Vec<GgufCompanionRequirement>, ArtifactError>
Declares the sibling artifacts required by one admitted GGUF architecture.
Provided Methods§
Sourcefn artifact_plan(
&self,
_path: &Path,
_format: ArtifactFormat,
_configuration: &ModelConfiguration,
_tensors: &TensorCatalog,
_validated_gguf: Option<&ValidatedGguf>,
resolved_plan: Self::ArtifactPlan,
) -> Result<Self::ArtifactPlan, ArtifactError>
fn artifact_plan( &self, _path: &Path, _format: ArtifactFormat, _configuration: &ModelConfiguration, _tensors: &TensorCatalog, _validated_gguf: Option<&ValidatedGguf>, resolved_plan: Self::ArtifactPlan, ) -> Result<Self::ArtifactPlan, ArtifactError>
Finalizes resolved architecture state against the inspected tensor catalog and exact sidecars selected by inspection.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".