Sequential trainer

Concept

Sequential trainer

Basic usage

 1from skrl.trainers.torch import SequentialTrainer
 2
 3# asuming there is an environment called 'env'
 4# and an agent or a list of agents called 'agents'
 5
 6# create a sequential trainer
 7cfg = {"timesteps": 50000, "headless": False}
 8trainer = SequentialTrainer(env=env, agents=agents, cfg=cfg)
 9
10# train the agent(s)
11trainer.train()
12
13# evaluate the agent(s)
14trainer.eval()

Configuration

skrl.trainers.torch.sequential.SEQUENTIAL_TRAINER_DEFAULT_CONFIG
1SEQUENTIAL_TRAINER_DEFAULT_CONFIG = {
2    "timesteps": 100000,            # number of timesteps to train for
3    "headless": False,              # whether to use headless mode (no rendering)
4    "disable_progressbar": False,   # whether to disable the progressbar. If None, disable on non-TTY
5}

API