Skip to main content

RealCommandRunner

Struct RealCommandRunner 

Source
pub struct RealCommandRunner {
    pub apr_binary: String,
}
Expand description

Real command runner that executes actual subprocess commands

Fields§

§apr_binary: String

Path to apr binary (default: “apr”)

Implementations§

Source§

impl RealCommandRunner

Source

pub fn new() -> Self

Create a new real command runner

Source

pub fn with_binary(apr_binary: impl Into<String>) -> Self

Create with custom apr binary path

Trait Implementations§

Source§

impl Clone for RealCommandRunner

Source§

fn clone(&self) -> RealCommandRunner

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CommandRunner for RealCommandRunner

Source§

fn run_inference( &self, model_path: &Path, prompt: &str, max_tokens: u32, no_gpu: bool, extra_args: &[&str], ) -> CommandOutput

Execute an apr run command
Source§

fn convert_model(&self, source: &Path, target: &Path) -> CommandOutput

Execute an apr convert command
Source§

fn inspect_model(&self, model_path: &Path) -> CommandOutput

Execute an apr rosetta inspect command
Source§

fn validate_model(&self, model_path: &Path) -> CommandOutput

Execute an apr validate command
Source§

fn validate_model_strict(&self, model_path: &Path) -> CommandOutput

Execute an apr validate command with –strict –json flags Read more
Source§

fn bench_model(&self, model_path: &Path) -> CommandOutput

Execute an apr bench command
Source§

fn check_model(&self, model_path: &Path) -> CommandOutput

Execute an apr check command
Source§

fn profile_model( &self, model_path: &Path, warmup: u32, measure: u32, ) -> CommandOutput

Execute an apr profile command
Source§

fn profile_ci( &self, model_path: &Path, min_throughput: Option<f64>, max_p99: Option<f64>, warmup: u32, measure: u32, ) -> CommandOutput

Execute apr profile in CI mode
Source§

fn diff_tensors( &self, model_a: &Path, model_b: &Path, json: bool, ) -> CommandOutput

Execute apr rosetta diff-tensors
Source§

fn compare_inference( &self, model_a: &Path, model_b: &Path, prompt: &str, max_tokens: u32, tolerance: f64, ) -> CommandOutput

Execute apr rosetta compare-inference
Source§

fn profile_with_flamegraph( &self, model_path: &Path, output_path: &Path, no_gpu: bool, ) -> CommandOutput

Execute apr run with –profile and –profile-output for flamegraph
Source§

fn profile_with_focus( &self, model_path: &Path, focus: &str, no_gpu: bool, ) -> CommandOutput

Execute apr run with –profile and –focus
Source§

fn fingerprint_model(&self, model_path: &Path, json: bool) -> CommandOutput

Execute apr rosetta fingerprint to capture tensor statistics
Source§

fn validate_stats(&self, fp_a: &Path, fp_b: &Path) -> CommandOutput

Execute apr rosetta validate-stats to compare tensor statistics
Source§

fn pull_model(&self, hf_repo: &str) -> CommandOutput

Execute apr pull --json <hf_repo> to acquire model from cache or remote
Source§

fn inspect_model_json(&self, model_path: &Path) -> CommandOutput

Execute apr rosetta inspect --json to get model metadata including tensor names Read more
Source§

fn run_ollama_inference( &self, model_tag: &str, prompt: &str, temperature: f64, ) -> CommandOutput

Execute ollama run <model_tag> for parity testing (GH-6/AC-2)
Source§

fn pull_ollama_model(&self, model_tag: &str) -> CommandOutput

Execute ollama pull <model_tag> to acquire model (GH-6/AC-2)
Source§

fn create_ollama_model( &self, model_tag: &str, modelfile_path: &Path, ) -> CommandOutput

Execute ollama create <tag> -f <modelfile> to register a GGUF with ollama (F-OLLAMA-005)
Source§

fn serve_model(&self, model_path: &Path, port: u16) -> CommandOutput

Execute apr serve and return immediately (F-OLLAMA-004) Read more
Source§

fn http_get(&self, url: &str) -> CommandOutput

Execute an HTTP GET request (F-OLLAMA-004)
Source§

fn profile_memory(&self, model_path: &Path) -> CommandOutput

Execute apr profile --memory for memory usage (F-PERF-005)
Source§

fn run_chat( &self, model_path: &Path, prompt: &str, no_gpu: bool, extra_args: &[&str], ) -> CommandOutput

Execute apr chat command with prompt piped via stdin (Bug 200)
Source§

fn http_post(&self, url: &str, body: &str) -> CommandOutput

Execute an HTTP POST request (Bug 200: serve modality)
Source§

fn spawn_serve( &self, model_path: &Path, port: u16, no_gpu: bool, ) -> CommandOutput

Spawn apr serve in background and return the child process PID (Bug 200) Read more
Source§

impl Debug for RealCommandRunner

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RealCommandRunner

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more