pub struct RLCheckpointer<RLC: RLComponentsTypes> { /* private fields */ }Available on crate feature
rl only.Expand description
Used to create, delete, or load checkpoints of the training process.
Implementations§
Source§impl<RLC: RLComponentsTypes> RLCheckpointer<RLC>
impl<RLC: RLComponentsTypes> RLCheckpointer<RLC>
Sourcepub fn new(
policy: AsyncCheckpointer<RLPolicyRecord<RLC>, RLC::Backend>,
learning_agent: AsyncCheckpointer<RLAgentRecord<RLC>, RLC::Backend>,
strategy: Box<dyn CheckpointingStrategy>,
) -> Self
pub fn new( policy: AsyncCheckpointer<RLPolicyRecord<RLC>, RLC::Backend>, learning_agent: AsyncCheckpointer<RLAgentRecord<RLC>, RLC::Backend>, strategy: Box<dyn CheckpointingStrategy>, ) -> Self
Constructs a new RLCheckpointer.
Source§impl<RLC: RLComponentsTypes> RLCheckpointer<RLC>
impl<RLC: RLComponentsTypes> RLCheckpointer<RLC>
Sourcepub fn checkpoint(
&mut self,
policy: &RLC::PolicyState,
learning_agent: &RLC::LearningAgent,
epoch: usize,
store: &EventStoreClient,
)
pub fn checkpoint( &mut self, policy: &RLC::PolicyState, learning_agent: &RLC::LearningAgent, epoch: usize, store: &EventStoreClient, )
Create checkpoint for the training process.
Sourcepub fn load_checkpoint(
&self,
learning_agent: RLC::LearningAgent,
device: &Device<RLC::Backend>,
epoch: usize,
) -> RLC::LearningAgent
pub fn load_checkpoint( &self, learning_agent: RLC::LearningAgent, device: &Device<RLC::Backend>, epoch: usize, ) -> RLC::LearningAgent
Load a training checkpoint.
Auto Trait Implementations§
impl<RLC> Freeze for RLCheckpointer<RLC>
impl<RLC> !RefUnwindSafe for RLCheckpointer<RLC>
impl<RLC> Send for RLCheckpointer<RLC>
impl<RLC> !Sync for RLCheckpointer<RLC>
impl<RLC> Unpin for RLCheckpointer<RLC>
impl<RLC> UnsafeUnpin for RLCheckpointer<RLC>
impl<RLC> !UnwindSafe for RLCheckpointer<RLC>
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