BestModelSelection

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)

Best model selection strategy.

Parameters
  • 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.

update(reward: float)None

(overrides ModelSelectionBase)

Implementation of ModelSelection.update().

param reward

Reward (score) used for best model selection.