pub struct LearningCheckpointer<LC: LearningComponentsTypes> { /* private fields */ }Expand description
Used to create, delete, or load checkpoints of the training process.
Implementations§
Source§impl<LC: LearningComponentsTypes> LearningCheckpointer<LC>
impl<LC: LearningComponentsTypes> LearningCheckpointer<LC>
Sourcepub fn new(
model: AsyncCheckpointer<LearnerModelRecord<LC>, LC::Backend>,
optim: AsyncCheckpointer<LearnerOptimizerRecord<LC>, LC::Backend>,
lr_scheduler: AsyncCheckpointer<LearnerSchedulerRecord<LC>, LC::Backend>,
strategy: Box<dyn CheckpointingStrategy>,
) -> Self
pub fn new( model: AsyncCheckpointer<LearnerModelRecord<LC>, LC::Backend>, optim: AsyncCheckpointer<LearnerOptimizerRecord<LC>, LC::Backend>, lr_scheduler: AsyncCheckpointer<LearnerSchedulerRecord<LC>, LC::Backend>, strategy: Box<dyn CheckpointingStrategy>, ) -> Self
Constructs a new LearningCheckpointer.
Source§impl<LC: LearningComponentsTypes> LearningCheckpointer<LC>
impl<LC: LearningComponentsTypes> LearningCheckpointer<LC>
Sourcepub fn checkpoint(
&mut self,
learner: &Learner<LC>,
epoch: usize,
store: &EventStoreClient,
)
pub fn checkpoint( &mut self, learner: &Learner<LC>, epoch: usize, store: &EventStoreClient, )
Create checkpoint for the training process.
Auto Trait Implementations§
impl<LC> Freeze for LearningCheckpointer<LC>
impl<LC> !RefUnwindSafe for LearningCheckpointer<LC>
impl<LC> Send for LearningCheckpointer<LC>
impl<LC> !Sync for LearningCheckpointer<LC>
impl<LC> Unpin for LearningCheckpointer<LC>
impl<LC> !UnwindSafe for LearningCheckpointer<LC>
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> 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