|
Mila
Deep Neural Network Library
|
Pulls a published model into the store. More...
Public Member Functions | |
| ModelResolver (ModelStore &store, const IModelHub &hub) | |
| StoredModel | pull (const ModelCoordinate &coordinate) |
| Pull an explicit coordinate, writing its record on success. | |
| StoredModel | pull (const std::string &name, const std::string &owner) |
| Pull a model by name. | |
Pulls a published model into the store.
Pull and load are separate verbs: this is the only thing that touches a hub, and what it leaves behind is a store record that every later operation reads.
|
inline |
Pull an explicit coordinate, writing its record on success.
The record is keyed by the repository name alone – the owner is provenance, kept in the record and never in the path, so what a user types to pull is what they type to load.
The record is written last. Until every blob has verified there is nothing worth recording, and a record naming a blob that never arrived would make a broken model look installed.
|
inline |
Pull a model by name.
The name is all a user gives: the hub and the owner are supplied by the caller, because a store that serves one publisher makes them a constant rather than a decision. A path is refused – installing is the operation that takes one, and a load reads only the store, where an undescribed file is a model nothing knows the quantization, the architecture or the integrity of.
| std::runtime_error | if the name is path-shaped, if the manifest is malformed, or if the artifact requires a newer Mila. |