evox.workflows.eval_monitor
#
Module Contents#
Classes#
Evaluation monitor. Used for both single-objective and multi-objective workflow. Hooked around the evaluation process, can monitor the offspring, their corresponding fitness and keep track of the evaluation count. Moreover, it can also record the best solution or the pareto front on-the-fly. |
API#
- class evox.workflows.eval_monitor.EvalMonitor(multi_obj: bool = False, full_fit_history: bool = True, full_sol_history: bool = False, full_pop_history: bool = False, topk: int = 1, device: torch.device | None = None)[source]#
Bases:
evox.core.Monitor
Evaluation monitor. Used for both single-objective and multi-objective workflow. Hooked around the evaluation process, can monitor the offspring, their corresponding fitness and keep track of the evaluation count. Moreover, it can also record the best solution or the pareto front on-the-fly.
Initialization
Initialize the monitor.
- Parameters:
multi_obj – Whether the optimization is multi-objective. Defaults to False.
full_fit_history – Whether to record the full history of fitness value. Default to True. Setting it to False may reduce memory usage.
full_sol_history – Whether to record the full history of solutions. Default to False. Setting it to True may increase memory usage.
topk – Only affect Single-objective optimization. The number of elite solutions to record. Default to 1, which will record the best individual.
device – The device of the monitor. Defaults to None.
- fitness_history: List[torch.Tensor]#
None
- solution_history: List[torch.Tensor]#
None
- auxiliary: List[Dict[str, torch.Tensor]]#
None