pub struct LearnerReport {
pub updates_completed: usize,
pub env_steps_consumed: usize,
pub episodes_completed: usize,
pub broadcasts_sent: usize,
pub last_policy_version: u64,
pub episode_rewards: Vec<f32>,
pub final_stats: Option<TrainingStats>,
}Expand description
Summary returned by learner_loop alongside the trained
crate::train::ppo::trainer::PPOTrainerBurn.
Fields§
§updates_completed: usizePPO updates completed.
env_steps_consumed: usizeEnv steps consumed into updates (num_steps * num_actors each).
episodes_completed: usizeEpisodes completed within the consumed steps.
broadcasts_sent: usizePolicy broadcasts sent (one per broadcast_every updates).
last_policy_version: u64Version number of the newest broadcast policy.
episode_rewards: Vec<f32>Total reward of every completed episode, in consumption order.
final_stats: Option<TrainingStats>Stats from the final PPO update, if any ran.
Implementations§
Source§impl LearnerReport
impl LearnerReport
Sourcepub fn mean_recent_episode_reward(&self, n: usize) -> f32
pub fn mean_recent_episode_reward(&self, n: usize) -> f32
Mean total reward over the most recent n completed episodes
(or all of them when fewer have completed). Returns 0.0 before
the first episode completes.
Trait Implementations§
Source§impl Clone for LearnerReport
impl Clone for LearnerReport
Source§fn clone(&self) -> LearnerReport
fn clone(&self) -> LearnerReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LearnerReport
impl Debug for LearnerReport
Source§impl Default for LearnerReport
impl Default for LearnerReport
Source§fn default() -> LearnerReport
fn default() -> LearnerReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LearnerReport
impl RefUnwindSafe for LearnerReport
impl Send for LearnerReport
impl Sync for LearnerReport
impl Unpin for LearnerReport
impl UnsafeUnpin for LearnerReport
impl UnwindSafe for LearnerReport
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