pub struct TrainerArgs {
pub env_dir: PathBuf,
pub save_model_path: PathBuf,
pub obs_dim: usize,
pub act_dim: usize,
pub buffer_size: usize,
}Expand description
Shared filesystem and shape arguments for every trainer constructor in this module.
These values are forwarded into the underlying algorithm implementations (replay sizing, logging paths, and similar runtime configuration).
§Fields
env_dir: working directory for environment-related assets the algorithm may expect.save_model_path: base path or directory used when persisting checkpoints (seeAlgorithmTrait::saveon the concrete algorithm).obs_dim,act_dim: observation and action space sizes used when wiring kernels and buffers.buffer_size: replay / trajectory buffer capacity for independent trainers; multi-agent trainers use the same field for their buffers.
§Examples
ⓘ
use std::path::PathBuf;
use relayrl_algorithms::TrainerArgs;
let args = TrainerArgs {
env_dir: PathBuf::from("./env"),
save_model_path: PathBuf::from("./checkpoints"),
obs_dim: 64,
act_dim: 8,
buffer_size: 1_000_000,
};Fields§
§env_dir: PathBufDirectory the algorithm treats as the environment root.
save_model_path: PathBufWhere to persist models or session output (algorithm-specific).
obs_dim: usizeObservation dimensionality expected by the policy / value stack.
act_dim: usizeAction dimensionality (or discrete action count, depending on your kernel).
buffer_size: usizeExperience buffer capacity in transitions or slots, depending on the algorithm.
Trait Implementations§
Source§impl Clone for TrainerArgs
impl Clone for TrainerArgs
Source§fn clone(&self) -> TrainerArgs
fn clone(&self) -> TrainerArgs
Returns a duplicate of the value. Read more
1.0.0 · 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 TrainerArgs
impl RefUnwindSafe for TrainerArgs
impl Send for TrainerArgs
impl Sync for TrainerArgs
impl Unpin for TrainerArgs
impl UnsafeUnpin for TrainerArgs
impl UnwindSafe for TrainerArgs
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