pub enum PolicyBroadcast {
Bytes {
version: u64,
bytes: Arc<Vec<u8>>,
},
}Expand description
In-process policy broadcast from a learner to its actors.
Cross-thread, in-process counterpart to PolicyUpdate (which
publishes a saved-model file path). This enum is what the
single-host asynchronous actor-learner runner
(crate::train::ppo::actor_learner) sends over each per-actor
crossbeam_channel broadcast channel after a learner update. The
payload representation is chosen by the learner implementation; the
actor side stays agnostic by matching on the variant.
Variants§
Bytes
Serialized Burn module record bytes, produced by
burn::record::BinBytesRecorder with
burn::record::FullPrecisionSettings.
Bytes are always Send regardless of the tensor backend (unlike
raw module clones, whose Send-ness depends on the backend’s
tensor primitives), and the Arc keeps the N-actor fan-out
allocation-free — each actor channel receives a cheap pointer
clone of the same serialized blob.
Implementations§
Trait Implementations§
Source§impl Clone for PolicyBroadcast
impl Clone for PolicyBroadcast
Source§fn clone(&self) -> PolicyBroadcast
fn clone(&self) -> PolicyBroadcast
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PolicyBroadcast
impl RefUnwindSafe for PolicyBroadcast
impl Send for PolicyBroadcast
impl Sync for PolicyBroadcast
impl Unpin for PolicyBroadcast
impl UnsafeUnpin for PolicyBroadcast
impl UnwindSafe for PolicyBroadcast
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
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>
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>
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