pub struct RealCommandRunner {
pub apr_binary: String,
}Expand description
Real command runner that executes actual subprocess commands
Fields§
§apr_binary: StringPath to apr binary (default: “apr”)
Implementations§
Trait Implementations§
Source§impl Clone for RealCommandRunner
impl Clone for RealCommandRunner
Source§fn clone(&self) -> RealCommandRunner
fn clone(&self) -> RealCommandRunner
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CommandRunner for RealCommandRunner
impl CommandRunner for RealCommandRunner
Source§fn run_inference(
&self,
model_path: &Path,
prompt: &str,
max_tokens: u32,
no_gpu: bool,
extra_args: &[&str],
) -> CommandOutput
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
fn convert_model(&self, source: &Path, target: &Path) -> CommandOutput
Execute an apr convert command
Source§fn inspect_model(&self, model_path: &Path) -> CommandOutput
fn inspect_model(&self, model_path: &Path) -> CommandOutput
Execute an apr rosetta inspect command
Source§fn validate_model(&self, model_path: &Path) -> CommandOutput
fn validate_model(&self, model_path: &Path) -> CommandOutput
Execute an apr validate command
Source§fn validate_model_strict(&self, model_path: &Path) -> CommandOutput
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
fn bench_model(&self, model_path: &Path) -> CommandOutput
Execute an apr bench command
Source§fn check_model(&self, model_path: &Path) -> CommandOutput
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
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
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
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
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
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
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
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
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
fn pull_model(&self, hf_repo: &str) -> CommandOutput
Execute
apr pull --json <hf_repo> to acquire model from cache or remoteSource§fn inspect_model_json(&self, model_path: &Path) -> CommandOutput
fn inspect_model_json(&self, model_path: &Path) -> CommandOutput
Execute
apr rosetta inspect --json to get model metadata including tensor names Read moreSource§fn run_ollama_inference(
&self,
model_tag: &str,
prompt: &str,
temperature: f64,
) -> CommandOutput
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
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
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
fn serve_model(&self, model_path: &Path, port: u16) -> CommandOutput
Execute
apr serve and return immediately (F-OLLAMA-004) Read moreSource§fn http_get(&self, url: &str) -> CommandOutput
fn http_get(&self, url: &str) -> CommandOutput
Execute an HTTP GET request (F-OLLAMA-004)
Source§fn profile_memory(&self, model_path: &Path) -> CommandOutput
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
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
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
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 moreSource§impl Debug for RealCommandRunner
impl Debug for RealCommandRunner
Auto Trait Implementations§
impl Freeze for RealCommandRunner
impl RefUnwindSafe for RealCommandRunner
impl Send for RealCommandRunner
impl Sync for RealCommandRunner
impl Unpin for RealCommandRunner
impl UnwindSafe for RealCommandRunner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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