simulo.Trainer
The training-orchestration contract — run and persist a training job.
A trainer owns the RL loop: it drives an environment, updates the policy, and
reads/writes checkpoints. Structural mirror of simulo.core.trainer.Trainer.
train()
Section titled “train()”Trainer.train(max_iterations: int) -> Dict[str, Any]Run the training loop for up to max_iterations and return summary metrics.
The returned mapping includes at least the final iteration count and reward statistics (implementation-defined keys).
save()
Section titled “save()”Trainer.save(path: str) -> NoneWrite the trainer’s full state (policy + optimizer) to path.
load()
Section titled “load()”Trainer.load(path: str) -> NoneRestore trainer state previously written by save().
Declared as:
@runtime_checkableclass TrainerProtocol(Protocol)