pub struct BufferedRecorder<E, R>where
E: Env,
R: ReplayBufferBase,{ /* private fields */ }
Expand description
A recorder that buffers sequences of observations and actions in memory.
The BufferedRecorder
is designed to temporarily store sequences of
environment interactions during evaluation runs. This is particularly useful
for analyzing agent behavior, debugging policies, or collecting demonstration
data.
§Type Parameters
E
- The environment type that implements theEnv
traitR
- The replay buffer type that implements theReplayBufferBase
trait
Implementations§
Source§impl<E, R> BufferedRecorder<E, R>where
E: Env,
R: ReplayBufferBase,
impl<E, R> BufferedRecorder<E, R>where
E: Env,
R: ReplayBufferBase,
Trait Implementations§
Source§impl<E, R> Default for BufferedRecorder<E, R>
impl<E, R> Default for BufferedRecorder<E, R>
Source§fn default() -> BufferedRecorder<E, R>
fn default() -> BufferedRecorder<E, R>
Source§impl<E, R> Recorder<E, R> for BufferedRecorder<E, R>where
E: Env,
R: ReplayBufferBase,
impl<E, R> Recorder<E, R> for BufferedRecorder<E, R>where
E: Env,
R: ReplayBufferBase,
Source§fn write(&mut self, record: Record)
fn write(&mut self, record: Record)
Writes a Record
to the internal buffer.
This method appends the given record to the end of the buffer. The records maintain their insertion order, which is important for sequential data analysis.
§Arguments
record
- The record to be stored in the buffer
§Note
This method is currently private as part of the Recorder
trait implementation.
Future versions may make it public if there’s a need for direct record insertion.
Source§fn flush(&mut self, _step: i64)
fn flush(&mut self, _step: i64)
Flushes the buffered data at the specified step.
This method is currently unimplemented as the buffered recorder is designed to hold all data in memory until explicitly processed.
§Arguments
_step
- The step at which to flush the buffer
§Panics
This method will panic if called, as it is not implemented.