Std.Ai.Registry
Std.Ai.Registry — versions of fine-tuned adapters, their lineage and eval
Types
type alias Handle = { db : Db , store : Store }
type Registry
type Format = Gguf | Safetensors
type Method = Lora | Qlora
type alias Adapter = { path : String , format : Format , method : Method }
type alias Lineage = { base : Local.ModelRef , dataset : String , datasetDigest : String , metadata : List ( String, String ) }
type alias Version = { name : String , number : Int , digest : String , size : Int , format : String , method : String , architecture : String , base : String , baseDigest : String , dataset : String , datasetDigest : String , metadata : List ( String, String ) , blocked : Maybe String , onDevice : Maybe String , createdAt : Int }
type alias AliasState = { name : String , aliasName : String , number : Int , generation : Int , updatedAt : Int }
type alias AliasEvent = { name : String , aliasName : String , seq : Int , action : String , from : Int , to : Int , report : String , reason : String , at : Int }
type alias ReportLink = { name : String , number : Int , suite : String , digest : String , candidate : String , passed : Int , failed : Int , errors : Int , passRate : Float , verdict : String , createdAt : Int }
type alias LineageReport = { version : Version , aliases : List String , reports : List ReportLink , events : List AliasEvent }
type alias DatasetVersion = { name : String , number : Int , digest : String , rows : Int , manifest : Dataset.Manifest , blocked : Maybe String , createdAt : Int }
type alias AdapterInfo = { format : String , kind : String , architecture : String }
type alias Companion = { role : String , path : String }
type alias Pointer = { name : String , aliasName : String , number : Int , generation : Int , digest : String , servedName : String }
type alias VersionManifest = { name : String , number : Int , label : String , servedName : String , digest : String , format : String , method : String , architecture : String , base : String , baseDigest : String , baseId : String , dataset : String , datasetDigest : String , peft : String , peftConfig : String , gguf : String }
Values
aliases : Registry -> String -> Task Error (List AliasState)
Every alias of a model.
allowOnDevice : Registry -> Version -> String -> Task Error ()
Clear a version for devices (`Std.Ai.Device`): an adapter runs on a
attachReport : Registry -> Version -> Eval.Report -> Task Error ()
Attach an eval report to a version, so `promote` can check the evidence
block : Registry -> Version -> String -> Task Error ()
Mark a version so it can never be promoted again (a forced promotion and a
companion : String -> Version -> Maybe String
A companion's digest by its role (`peft`, `peft.config`, `gguf`).
database : Registry -> Db
The registry's database: the app's own, where the eval runs that gate a
datasetLabel : DatasetVersion -> String
`<name>@<number>`: the reference a training lineage records.
datasetValue : DatasetVersion -> JsonE.Value
A dataset version as JSON (`sky ai data freeze --format json`).
datasetVersion : Registry -> String -> Task Error DatasetVersion
A registered dataset version by reference: `<name>@<number>` or
datasetVersions : Registry -> String -> Task Error (List DatasetVersion)
Every registered version of a dataset, newest first.
evalHistory : Registry -> String -> Task Error (List ReportLink)
Every report attached to any version of a model, newest first: the
eventValue : AliasEvent -> JsonE.Value
An alias event as JSON.
evidence : Registry -> Version -> Eval.Thresholds -> Task Error Eval.Passed
The evidence already attached to a version: re-apply the gate
evidenceAgainst : Registry -> String -> Version -> (String -> Eval.Thresholds) -> Task Error ( Eval.Passed, Maybe Version )
The evidence for moving an alias to a version, compared against the
fetch : Registry -> Version -> Task Error String
A local path holding the version's adapter, checked against its digest.
fetchDataset : Registry -> DatasetVersion -> Task Error String
A local path holding the dataset version's JSONL, checked against its
forcePromote : Registry -> String -> Version -> String -> Task Error AliasEvent
Point an alias at a version without eval evidence. The reason is required
history : Registry -> String -> String -> Task Error (List AliasEvent)
The moves of `<name>@<alias>`, newest first.
label : Version -> String
A version's label: `<name>@v<number>`. Run a suite with
lineage : Registry -> String -> Task Error LineageReport
The full lineage of the version a reference names: the version (with its
lineageValue : LineageReport -> JsonE.Value
A lineage report as JSON.
open : Db -> Store -> Task Error Registry
Open the registry on a database and a store. The registry's tables are
openConfigured : Db -> String -> Task Error Registry
`open` with the store at `SKY_AI_REGISTRY` (under the project's prefix),
promote : Registry -> String -> Version -> Eval.Passed -> Task Error AliasEvent
Point an alias at a version. The `Passed` must name this version
promoteChecked : Registry -> String -> Version -> Eval.Thresholds -> Task Error AliasEvent
Promote on the evidence already attached (`evidence`), each report gated
promoteCompared : Registry -> String -> Version -> (String -> Eval.Thresholds) -> Task Error AliasEvent
Promote on the attached evidence compared against the version the alias
promoteIf : Registry -> String -> Maybe Version -> Version -> Eval.Passed -> Task Error AliasEvent
`promote`, only when the alias still points at `expected` (`Nothing`: the
publishPointers : Registry -> String -> Task Error Int
Write the store's pointer objects for a model: every version's manifest
readManifest : Store -> String -> Int -> Task Error (Maybe VersionManifest)
A version's manifest, as the store holds it.
readPointer : Store -> String -> String -> Task Error (Maybe Pointer)
Where `<name>@<alias>` points, as the store holds it.
register : Registry -> String -> Adapter -> Lineage -> Task Error Version
Register an adapter under a model name. The file is checked (a GGUF file
registerDataset : Registry -> Dataset.Manifest -> String -> Task Error DatasetVersion
Register a frozen dataset version (`Std.Ai.Dataset.freeze`): its data
registerWith : Registry -> String -> Adapter -> Lineage -> List Companion -> Task Error Version
`register` with companion files (see `Companion`). After the record is
reportLinkValue : ReportLink -> JsonE.Value
An attached report as JSON.
reports : Registry -> Version -> Task Error (List ReportLink)
The reports attached to a version, newest first.
resolve : Registry -> String -> Task Error Version
The version a reference names: `<name>@<alias>` or `<name>@v<number>`.
resolver : Task Error Registry -> Endpoint.Resolver
The resolver a slot uses to serve `registry:<name>@<alias>` adapters
rollback : Registry -> String -> Task Error AliasEvent
Move `<name>@<alias>` back to the version it pointed at before the
servedName : Version -> String
The name a server knows the adapter by (the request's model name):
store : Registry -> Store
The registry's artefact store.
storeResolver : Store -> Endpoint.Resolver
A resolver that reads only the store's pointer objects: for a serving
trainedOn : Registry -> String -> Task Error (List Version)
Every version trained on a dataset: the versions to retrain (and `block`)
version : Registry -> String -> Int -> Task Error Version
One version by name and number.
versionValue : Version -> JsonE.Value
A version as JSON (for `sky ai lineage --format json` and the console).
versions : Registry -> String -> Task Error (List Version)
Every version of a model, newest first.