pub struct NoopModelRuntime;Expand description
A ModelRuntimePort that never has anything running.
For callers with no shared ProcessManager to point at — the CLI’s
single-shot commands, whose is_serving checks
against a runtime scoped to that one process invocation would report
“nothing running” regardless, since nothing was started in it. Making that
explicit here is more honest than wiring in a real runner that can only
ever agree.
Trait Implementations§
Source§impl Debug for NoopModelRuntime
impl Debug for NoopModelRuntime
Source§impl Default for NoopModelRuntime
impl Default for NoopModelRuntime
Source§fn default() -> NoopModelRuntime
fn default() -> NoopModelRuntime
Returns the “default value” for a type. Read more
Source§impl ModelRuntimePort for NoopModelRuntime
impl ModelRuntimePort for NoopModelRuntime
Source§fn admit<'life0, 'life1, 'async_trait>(
&'life0 self,
_model_name: &'life1 str,
_num_ctx: Option<u64>,
_default_ctx: Option<u64>,
_overrides: LaunchOverrides,
) -> Pin<Box<dyn Future<Output = Result<Admission, ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn admit<'life0, 'life1, 'async_trait>(
&'life0 self,
_model_name: &'life1 str,
_num_ctx: Option<u64>,
_default_ctx: Option<u64>,
_overrides: LaunchOverrides,
) -> Pin<Box<dyn Future<Output = Result<Admission, ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Admit a request to a running model, launching or swapping if needed. Read more
Source§fn current_model<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<RunningTarget>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_model<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<RunningTarget>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get information about the currently running model, if any. Read more
Source§fn stop_current<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_current<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the currently running model. Read more
Source§fn admission_snapshot(&self) -> AdmissionSnapshot
fn admission_snapshot(&self) -> AdmissionSnapshot
What the admission queue and the VRAM resident set look like right now. Read more
Source§fn list_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ProcessHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ProcessHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Every llama-server process this runtime currently owns. Read more
Source§fn pinned_model(&self) -> Option<String>
fn pinned_model(&self) -> Option<String>
The one model this runtime is pinned to, if any. Read more
Source§fn set_pin(&self, pin: Option<PinnedSpec>) -> Result<(), ModelRuntimeError>
fn set_pin(&self, pin: Option<PinnedSpec>) -> Result<(), ModelRuntimeError>
Pin this runtime to a single model, or clear the pin. Read more
Auto Trait Implementations§
impl Freeze for NoopModelRuntime
impl RefUnwindSafe for NoopModelRuntime
impl Send for NoopModelRuntime
impl Sync for NoopModelRuntime
impl Unpin for NoopModelRuntime
impl UnsafeUnpin for NoopModelRuntime
impl UnwindSafe for NoopModelRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more