Expand description
§model-runtime
Generic model infrastructure for the workspace.
This crate owns model identity, sources, bundle materialization, downloads,
model-specific artifact metadata, and job helpers. Generic artifact storage and
validation live in moritzbrantner-jobs-core; model bundles and Hugging Face download logic
stay here. Domain crates should hide this layer behind operations such as object
detection, transcription, OCR, segmentation, embeddings, and classification.
§Runtime Surface
model.executionPlanvalidates aModelAccessJobRequestand returns a pure job/access plan with runtime execution metadata.model.bundlePlanplans bundle manifest layout and artifact references without downloading or materializing files.model.jobManifestprojects a planned model access job into a deterministicJobManifest.model.presetslists preset ids and model spec summaries.model.specvalidates a model spec and returns safe names, task, source, requested files, and revision.
Default surface operations are deterministic and planning-only. They do not download models, spawn background jobs, run native inference, execute external commands, write files, or access the network.
§Local ONNX Defaults
moritzbrantner-model-runtime owns materialization for the server-only local
model workflows used by text QA, image classification, and image captioning.
The current ONNX-first presets are:
roberta-base-squad2-onnx:onnx-community/roberta-base-squad2-ONNX.vit-base-patch16-224-onnx:Xenova/vit-base-patch16-224.vit-gpt2-image-captioning-onnx:Xenova/vit-gpt2-image-captioning.
Use resolve_or_download_bundle when a workflow should load an existing
bundle first and auto-download missing files into .model-runtime on native
server/CLI runtimes. WASM callers should keep using validation/import paths.
Re-exports§
pub use jobs::plan_model_access;pub use jobs::plan_model_bundle;pub use jobs::ModelAccessJobRequest;pub use jobs::ModelAccessPlan;pub use jobs::ModelBundlePlan;pub use jobs::ModelBundlePlanFile;pub use jobs::ModelJobInput;pub use jobs::ModelJobKind;
Modules§
Structs§
- Blue
Green Prediction Test Options - Data type for blue/green prediction test options.
- Blue
Green Prediction Test Report - Data type for blue/green prediction test report.
- Cuda
Oxide Model Plan - Data type for cuda-oxide model plan.
- Cuda
Oxide Runtime Config - Data type for cuda-oxide runtime config.
- Downloaded
Model - Data type for downloaded model.
- Hugging
Face Downloader - Data type for hugging face downloader.
- Model
Bundle - Data type for model bundle.
- Model
Bundle File - Data type for model bundle file.
- Model
Bundle Manifest - Data type for model bundle manifest.
- Model
Bundle Resolve Options - Options for resolving a local bundle, downloading it when allowed.
- Model
Bundle Store - Data type for model bundle store.
- Model
Runtime Selection - Advanced generic runtime selection.
- Model
Spec - Generic model spec.
- RawPrediction
- Backend-neutral raw model prediction used for runtime conformance checks.
Enums§
- Fallback
Policy - General fallback behavior for model-backed operations.
- Model
File Request - Variants describing model file request.
- Model
Preset - Variants describing model preset.
- Model
Runtime Backend - Variants describing model runtime backend.
- Model
Runtime Error - Error type used by generic model runtime infrastructure.
- Model
Source - Model source.
- Model
Task - Variants describing model task.
- Runtime
Preference - General runtime preference for domain APIs.
Constants§
- CUDA_
OXIDE_ BOOK_ URL - Documentation URL for the cuda-oxide compiler/runtime stack.
Traits§
- Model
Downloader - Minimal downloader seam for bundle resolution tests and alternate materializers.
Functions§
- compare_
blue_ green_ predictions - Compares green and blue model predictions for runtime conformance tests.
- resolve_
or_ download_ bundle - Resolves a bundle from disk, optionally downloading and materializing it first.
- resolve_
or_ download_ bundle_ with_ downloader - Resolves a bundle with a caller-provided downloader seam.
Type Aliases§
- Hugging
Face Model Spec - Hugging Face-oriented compatibility alias for callers migrating to
ModelSpec. - Result
- Result type used by generic model runtime infrastructure.