pub struct MLflowClient { /* private fields */ }Expand description
MLflow client for experiment tracking
Implementations§
Source§impl MLflowClient
impl MLflowClient
Sourcepub fn new(config: MLflowConfig) -> Self
pub fn new(config: MLflowConfig) -> Self
Sourcepub fn set_tracking_uri(&mut self, uri: impl Into<String>)
pub fn set_tracking_uri(&mut self, uri: impl Into<String>)
Sourcepub fn log_metric(
&mut self,
key: impl Into<String>,
value: f64,
step: i64,
) -> Result<()>
pub fn log_metric( &mut self, key: impl Into<String>, value: f64, step: i64, ) -> Result<()>
Log a metric at a specific step
§Arguments
key- Metric namevalue- Metric valuestep- Step number
Sourcepub fn log_tensor_stats(
&mut self,
prefix: &str,
tensor: &Tensor,
step: i64,
) -> Result<()>
pub fn log_tensor_stats( &mut self, prefix: &str, tensor: &Tensor, step: i64, ) -> Result<()>
Log tensor statistics as metrics
§Arguments
prefix- Metric name prefixtensor- Tensor to analyzestep- Step number
Sourcepub fn log_array_stats(
&mut self,
prefix: &str,
array: &Array1<f64>,
step: i64,
) -> Result<()>
pub fn log_array_stats( &mut self, prefix: &str, array: &Array1<f64>, step: i64, ) -> Result<()>
Log array statistics as metrics
§Arguments
prefix- Metric name prefixarray- Array to analyzestep- Step number
Sourcepub fn log_artifact(
&self,
local_path: impl AsRef<Path>,
artifact_path: Option<&str>,
artifact_type: ArtifactType,
) -> Result<()>
pub fn log_artifact( &self, local_path: impl AsRef<Path>, artifact_path: Option<&str>, artifact_type: ArtifactType, ) -> Result<()>
Log an artifact (file)
§Arguments
local_path- Path to local fileartifact_path- Optional path within artifact storageartifact_type- Type of artifact
Sourcepub fn log_model(
&self,
model_path: impl AsRef<Path>,
model_name: Option<&str>,
) -> Result<()>
pub fn log_model( &self, model_path: impl AsRef<Path>, model_name: Option<&str>, ) -> Result<()>
Sourcepub fn get_run_info(&self) -> Option<RunInfo>
pub fn get_run_info(&self) -> Option<RunInfo>
Get current run information
Sourcepub fn get_params(&self) -> HashMap<String, String>
pub fn get_params(&self) -> HashMap<String, String>
Get all logged parameters
Sourcepub fn get_metrics(&self) -> HashMap<String, Vec<MetricPoint>>
pub fn get_metrics(&self) -> HashMap<String, Vec<MetricPoint>>
Get all logged metrics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MLflowClient
impl !RefUnwindSafe for MLflowClient
impl Send for MLflowClient
impl Sync for MLflowClient
impl Unpin for MLflowClient
impl !UnwindSafe for MLflowClient
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.