class maze.train.trainers.common.model_selection.best_model_selection.BestModelSelection(dump_file: Optional[str], model: Optional[maze.core.agent.torch_model.TorchModel], dump_interval: Optional[int] = None, verbose: bool = False)

Best model selection strategy.

  • dump_file – Specifies the file path to dump the policy state for the best reward.

  • model – The model to be dumped.

  • dump_interval – Update count interval between regularly dumping the model parameters.

  • verbose – If true status messages get printed to the command line.


Reset model to overall best state dict.

update(reward: float)None

(overrides ModelSelectionBase)

Implementation of ModelSelection.update().

param reward

Reward (score) used for best model selection.