Crate border_async_trainer
source · [−]Expand description
Asynchronous trainer using replay buffer.
Training process consists of the following two components:
- ActorManager manages Actors, each of which runs a thread for interacting
Agent
andEnv
and taking samples. Those samples will be sent to the replay buffer in AsyncTrainer. - AsyncTrainer is responsible for training of an agent. It also runs a thread for pushing samples from ActorManager into a replay buffer.
The Agent
must implement SyncModel trait in order to synchronize the model of
the agent in Actor with the trained agent in AsyncTrainer. The trait has
the ability to import and export the information of the model as
SyncModel::ModelInfo
.
The Agent
in AsyncTrainer is responsible for training, typically with a GPU,
while the Agent
s in Actors in ActorManager is responsible for sampling
using CPU.
Both AsyncTrainer and ActorManager are running in the same machine and communicate by channels.
Structs
Manages Actors.
Configuration of ActorManager.
Stats of AsyncTrainer::train()
.
Manages asynchronous training loop in a single machine.
Configuration of AsyncTrainer
Message containing a ReplayBufferBase::PushedItem
.
A wrapper of replay buffer for asynchronous trainer.
Configuration of ReplayBufferProxy.
Enums
Traits
Synchronizes the model of the agent in asynchronous training.
Functions
Returns a formatted string of the set of ActorStat for reporting.