Optimizer
Optimizer state and info dataclasses.
BudgetInfo
dataclass
#
BudgetInfo(
max_cost_total: float | None = None,
used_cost_budget: float = 0.0,
max_evaluations: int | None = None,
used_evaluations: int = 0,
)
Information about the budget of an optimizer.
clone
#
clone() -> BudgetInfo
OptimizationState
dataclass
#
OptimizationState(
budget: BudgetInfo | None,
seed_snapshot: SeedSnapshot,
shared_state: dict[str, Any] | None,
)
The current state of an optimizer.
budget
instance-attribute
#
budget: BudgetInfo | None
Information regarind the budget used by the optimization trajectory.
seed_snapshot
instance-attribute
#
seed_snapshot: SeedSnapshot
The state of the random number generators at the time of the last sample.
shared_state
instance-attribute
#
Any information the optimizer wants to store between calls to sample and post evaluations.
For example, an optimizer may wish to store running totals here or various other bits of information that may be expensive to recompute.
Right now there's no support for tensors/arrays and almost no optimizer uses this
feature. Only cost-cooling uses information out of .budget
.
Please reach out to @eddiebergman if you have a use case for this so we can make it more robust.