BestModelSelection¶
- class maze.train.trainers.common.model_selection.best_model_selection.BestModelSelection(dump_file: str | None, model: TorchModel | None, dump_interval: int | None = None, verbose: bool = False)¶
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.
verbose – If true status messages get printed to the command line.
- update(reward: float) None¶
(overrides
ModelSelectionBase)Implementation of ModelSelection.update().
- param reward:
Reward (score) used for best model selection.