Skip to main content

load_model

Function load_model 

Source
pub(crate) async fn load_model(
    state: &Arc<AppState>,
) -> Result<Arc<Model>, ApiError>
Expand description

The current model: the cached copy, or (on a miss) one load from the store on a blocking thread. The cache write lock is held across the load, so a concurrent writer’s save_model replaces it only after a stale load lands.