Skip to main content

Module install

Module install 

Source
Expand description

Installing a model from the feed, and resolving which model each role runs: the doc’s own download link, a size-checked fetch into the models directory, the record of what arrived, and the config-key / runtime-pick / compiled-pin order an active model comes from.

A download is checked against whatever the entry declares: its byte length always, and its digest when it carries one. The speech feed’s docs publish no digest, so those files are checked by length and by whether the engine can load them; the Hub’s blobs publish a sha256, and the fetch verifies it once, at install - the record does not keep it, and nothing here may call a file verified.

Re-exports§

use std::cell::Cell; 🔒
use std::sync::Arc; 🔒
use forge_dictate::catalogue::CatalogueEntry; 🔒
use forge_dictate::catalogue::CatalogueSource; 🔒
use forge_dictate::catalogue::Download; 🔒
use forge_dictate::catalogue::EntryKind; 🔒
use forge_dictate::ModelFacts; 🔒
use forge_dictate::ModelSpec; 🔒
use forge_dictate::Progress; 🔒
use serde::Deserialize; 🔒
use serde::Deserialize; 🔒
use serde::Serialize; 🔒
use serde::Serialize; 🔒
use crate::bench::BenchState; 🔒
use crate::catalogue::PREFERRED_DOWNLOADS; 🔒
use crate::dictate::DictateRole; 🔒
use crate::dictate::DictateSettings; 🔒
use crate::DispatchError; 🔒
use crate::SessionUpdate; 🔒
use crate::Workspace; 🔒

Structs§

ActiveChoice
The runtime pick as one role records it: the variant, resolved through the installed set, and when the pick was made.
ActiveModel
The model one role runs, and where that choice came from.
InstalledModel
One model this machine has downloaded from the feed.

Enums§

ActivateState
Where an activation is, as the page draws it.
ActiveFrom
Where a role’s model came from.
InstallState
Where an install is, as the page draws it.
RoleResolution 🔒
What resolving one role answers: a model, or the feed lookup a config key needs.

Functions§

build_engine 🔒
Build and load one engine off the runtime thread, answering it or the reason it could not serve.
download_blob 🔒
Fetch one file of a speaking install, reporting the whole set’s progress.
key_for_role 🔒
The config key that pins one role.
preferred_download 🔒
The download the row draws: the preferred quant chain, most wanted first.
remove_written 🔒
Take back the files a failed install created, leaving files that were already on disk alone.
resolve_role 🔒
One role’s model, from the config key when set, else the runtime pick, else the compiled pin.
rfc3339_now 🔒
A SystemTime as RFC 3339, the stamp a result is comparable by.
section_for 🔒
The table a role’s pinning key lives in.
spec_for_entry 🔒
The spec one feed entry describes for the quant a row draws: where the file is, the entry’s own byte length, the digest where its host publishes one, and the facts both carry.
spec_from_record 🔒
The spec an installed record names. The record keeps no digest, so the size is the identity a loader can check.