pub struct ExperimentRunHandle { /* private fields */ }Expand description
Represents a handle to an experiment, allowing logging of artifacts, metrics, and messages.
Implementations§
Source§impl ExperimentRunHandle
impl ExperimentRunHandle
Sourcepub fn log_args<A>(&self, args: &A) -> Result<(), ExperimentTrackerError>where
A: Serialize,
pub fn log_args<A>(&self, args: &A) -> Result<(), ExperimentTrackerError>where
A: Serialize,
Log arguments used to launch this experiment
Sourcepub fn log_artifact<E>(
&self,
name: impl Into<String>,
kind: ArtifactKind,
sources: E,
settings: &<E as BundleEncode>::Settings,
) -> Result<(), ExperimentTrackerError>where
E: BundleEncode,
pub fn log_artifact<E>(
&self,
name: impl Into<String>,
kind: ArtifactKind,
sources: E,
settings: &<E as BundleEncode>::Settings,
) -> Result<(), ExperimentTrackerError>where
E: BundleEncode,
Log an artifact with the given name, kind and settings.
Sourcepub fn load_artifact<D>(
&self,
name: impl AsRef<str>,
settings: &<D as BundleDecode>::Settings,
) -> Result<D, ExperimentTrackerError>where
D: BundleDecode,
pub fn load_artifact<D>(
&self,
name: impl AsRef<str>,
settings: &<D as BundleDecode>::Settings,
) -> Result<D, ExperimentTrackerError>where
D: BundleDecode,
Loads an artifact with the given name and settings.
Sourcepub fn load_artifact_raw(
&self,
name: impl AsRef<str>,
) -> Result<InMemoryBundleReader, ExperimentTrackerError>
pub fn load_artifact_raw( &self, name: impl AsRef<str>, ) -> Result<InMemoryBundleReader, ExperimentTrackerError>
Loads a raw artifact with the given name.
Sourcepub fn log_metric(
&self,
epoch: usize,
split: impl Into<String>,
iteration: usize,
items: Vec<MetricLog>,
)
pub fn log_metric( &self, epoch: usize, split: impl Into<String>, iteration: usize, items: Vec<MetricLog>, )
Logs a metric with the given name, epoch, iteration, value, and group.
Sourcepub fn try_log_metric(
&self,
epoch: usize,
split: impl Into<String>,
iteration: usize,
items: Vec<MetricLog>,
) -> Result<(), ExperimentTrackerError>
pub fn try_log_metric( &self, epoch: usize, split: impl Into<String>, iteration: usize, items: Vec<MetricLog>, ) -> Result<(), ExperimentTrackerError>
Attempts to log a metric with the given name, epoch, iteration, value, and group.
pub fn log_metric_definition( &self, name: impl Into<String>, description: Option<String>, unit: Option<String>, higher_is_better: bool, ) -> Result<(), ExperimentTrackerError>
pub fn log_epoch_summary( &self, epoch: usize, split: String, best_metric_values: Vec<MetricLog>, ) -> Result<(), ExperimentTrackerError>
Sourcepub fn try_log_info(
&self,
message: impl Into<String>,
) -> Result<(), ExperimentTrackerError>
pub fn try_log_info( &self, message: impl Into<String>, ) -> Result<(), ExperimentTrackerError>
Attempts to log an info message.
Sourcepub fn try_log_error(
&self,
error: impl Into<String>,
) -> Result<(), ExperimentTrackerError>
pub fn try_log_error( &self, error: impl Into<String>, ) -> Result<(), ExperimentTrackerError>
Attempts to log an error message.
pub fn log_config<C>(
&self,
name: impl Into<String>,
config: &C,
) -> Result<(), ExperimentTrackerError>where
C: Serialize,
Sourcepub fn is_cancelled(&self) -> Result<bool, ExperimentTrackerError>
pub fn is_cancelled(&self) -> Result<bool, ExperimentTrackerError>
Check whether the experiment has been cancelled (either locally or via server request). Returns an error if the experiment has already become inactive.
Sourcepub fn cancel_token(&self) -> Result<CancelToken, ExperimentTrackerError>
pub fn cancel_token(&self) -> Result<CancelToken, ExperimentTrackerError>
Returns the experiment cancel token.
Trait Implementations§
Source§impl Clone for ExperimentRunHandle
impl Clone for ExperimentRunHandle
Source§fn clone(&self) -> ExperimentRunHandle
fn clone(&self) -> ExperimentRunHandle
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 moreAuto Trait Implementations§
impl Freeze for ExperimentRunHandle
impl !RefUnwindSafe for ExperimentRunHandle
impl Send for ExperimentRunHandle
impl Sync for ExperimentRunHandle
impl Unpin for ExperimentRunHandle
impl !UnwindSafe for ExperimentRunHandle
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