pub struct ExperimentRun { /* private fields */ }Expand description
Represents an experiment in Burn Central, which is a run of a machine learning model or process.
Implementations§
Source§impl ExperimentRun
impl ExperimentRun
pub fn new( burn_client: Client, namespace: &str, project_name: &str, experiment_num: i32, ) -> Result<ExperimentRun, ExperimentTrackerError>
Sourcepub fn handle(&self) -> ExperimentRunHandle
pub fn handle(&self) -> ExperimentRunHandle
Returns a handle to the experiment, allowing logging of artifacts, metrics, and messages.
pub fn id(&self) -> &ExperimentPath
pub fn finish(self) -> Result<(), ExperimentTrackerError>
pub fn fail( self, reason: impl Into<String>, ) -> Result<(), ExperimentTrackerError>
Methods from Deref<Target = 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 Deref for ExperimentRun
Temporary implementation to allow dereferencing the Experiment to its recorder
This will be removed once the experiment logging api is completed
impl Deref for ExperimentRun
Temporary implementation to allow dereferencing the Experiment to its recorder This will be removed once the experiment logging api is completed
Source§type Target = ExperimentRunHandle
type Target = ExperimentRunHandle
Auto Trait Implementations§
impl Freeze for ExperimentRun
impl !RefUnwindSafe for ExperimentRun
impl Send for ExperimentRun
impl Sync for ExperimentRun
impl Unpin for ExperimentRun
impl !UnwindSafe for ExperimentRun
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
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>
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>
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