pub struct PolicyUpdate {
pub agent_id: AgentId,
pub version: u64,
pub model_path: String,
pub stats: TrainingStats,
}Expand description
Policy update message sent from a learner back to a simulator.
Pre-Burn this carried a path to a saved tch model file so the
simulator could reload via VarStore. Post-Burn the same pattern
works: the learner saves a Burn BinFileRecorder checkpoint and
publishes the path. The simulator may also pull updates in-process
by clone()ing the learner’s burn::module::Module directly —
this struct is the cross-thread path.
Fields§
§agent_id: AgentIdAgent whose policy was updated.
version: u64New policy version number (monotonically increasing).
model_path: StringPath to saved model file (learner saves, simulator loads). Avoids sending large parameter blobs through channels.
stats: TrainingStatsTraining statistics for logging.
Trait Implementations§
Source§impl Clone for PolicyUpdate
impl Clone for PolicyUpdate
Source§fn clone(&self) -> PolicyUpdate
fn clone(&self) -> PolicyUpdate
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 moreAuto Trait Implementations§
impl Freeze for PolicyUpdate
impl RefUnwindSafe for PolicyUpdate
impl Send for PolicyUpdate
impl Sync for PolicyUpdate
impl Unpin for PolicyUpdate
impl UnsafeUnpin for PolicyUpdate
impl UnwindSafe for PolicyUpdate
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