pub struct TrainingSession { /* private fields */ }Implementations§
Source§impl TrainingSession
impl TrainingSession
pub fn id(&self) -> TrainingSessionID
pub fn uid(&self) -> String
pub fn name(&self) -> &str
pub fn description(&self) -> &str
pub fn model(&self) -> &str
pub fn experiment_id(&self) -> ExperimentID
pub fn task(&self) -> Task
pub fn model_params(&self) -> &HashMap<String, Parameter>
pub fn dataset_params(&self) -> &DatasetParams
pub fn train_group(&self) -> &str
pub fn val_group(&self) -> &str
pub async fn experiment(&self, client: &Client) -> Result<Experiment, Error>
pub async fn dataset(&self, client: &Client) -> Result<Dataset, Error>
pub async fn annotation_set( &self, client: &Client, ) -> Result<AnnotationSet, Error>
pub async fn artifacts(&self, client: &Client) -> Result<Vec<Artifact>, Error>
pub async fn metrics( &self, client: &Client, ) -> Result<HashMap<String, Parameter>, Error>
pub async fn set_metrics( &self, client: &Client, metrics: HashMap<String, Parameter>, ) -> Result<(), Error>
Sourcepub async fn download_artifact(
&self,
client: &Client,
filename: &str,
) -> Result<Vec<u8>, Error>
pub async fn download_artifact( &self, client: &Client, filename: &str, ) -> Result<Vec<u8>, Error>
Downloads an artifact from the training session.
Sourcepub async fn upload_artifact(
&self,
client: &Client,
filename: &str,
path: PathBuf,
) -> Result<(), Error>
pub async fn upload_artifact( &self, client: &Client, filename: &str, path: PathBuf, ) -> Result<(), Error>
Uploads an artifact to the training session. The filename will be used as the name of the file in the training session while path is the local path to the file to upload.
Sourcepub async fn download_checkpoint(
&self,
client: &Client,
filename: &str,
) -> Result<Vec<u8>, Error>
pub async fn download_checkpoint( &self, client: &Client, filename: &str, ) -> Result<Vec<u8>, Error>
Downloads a checkpoint file from the training session.
Sourcepub async fn upload_checkpoint(
&self,
client: &Client,
filename: &str,
path: PathBuf,
) -> Result<(), Error>
pub async fn upload_checkpoint( &self, client: &Client, filename: &str, path: PathBuf, ) -> Result<(), Error>
Uploads a checkpoint file to the training session. The filename will be used as the name of the file in the training session while path is the local path to the file to upload.
Sourcepub async fn download(
&self,
client: &Client,
filename: &str,
) -> Result<String, Error>
pub async fn download( &self, client: &Client, filename: &str, ) -> Result<String, Error>
Downloads a file from the training session. Should only be used for text files, binary files must be downloaded using download_artifact or download_checkpoint.
pub async fn upload( &self, client: &Client, files: &[(String, PathBuf)], ) -> Result<(), Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TrainingSession
impl<'de> Deserialize<'de> for TrainingSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TrainingSession
impl RefUnwindSafe for TrainingSession
impl Send for TrainingSession
impl Sync for TrainingSession
impl Unpin for TrainingSession
impl UnwindSafe for TrainingSession
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<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.