Utils¶
- exception iohblade.utils.NoCodeException¶
Bases:
Exception
Could not extract generated code.
- exception iohblade.utils.OverBudgetException¶
Bases:
Exception
The algorithm tried to do more evaluations than allowed.
- exception iohblade.utils.ThresholdReachedException¶
Bases:
Exception
The algorithm reached the lower threshold.
- exception iohblade.utils.TimeoutException¶
Bases:
Exception
Custom exception for handling timeouts.
- class iohblade.utils.aoc_logger(budget, lower=1e-08, upper=100000000.0, scale_log=True, stop_on_threshold=False, *args, **kwargs)¶
Bases:
AbstractLogger
aoc_logger class implementing the logging module for ioh.
- reset(self: ioh.iohcpp.logger.Logger) None ¶
Reset the state of the logger
- class iohblade.utils.budget_logger(budget, *args, **kwargs)¶
Bases:
AbstractLogger
budget_logger class implementing the logging module for ioh.
- reset(self: ioh.iohcpp.logger.Logger) None ¶
Reset the state of the logger
- iohblade.utils.code_compare(code1, code2)¶
- iohblade.utils.convert_to_serializable(data)¶
- iohblade.utils.correct_aoc(ioh_function, logger, budget)¶
Correct aoc values in case a run stopped before the budget was exhausted
- Args:
ioh_function: The function in its final state (before resetting!) logger: The logger in its final state, so we can ensure the settings for aoc calculation match budget: The intended maximum budget
- Returns:
float: The normalized aoc of the run, corrected for stopped runs
- iohblade.utils.is_jsonable(x)¶