cruise
cruise copied to clipboard
Implement a stateful optimizer
Optimizers may work better if they are stateful. For example, an optimizer that works on a weighted average of metrics may cope better with fluctuations than a stateless optimizer.
The current structure is not amenable to a stateful optimizer. Previous EvaluatorParameters are not stored by the Orchestrator. The Orchestrator may also skip calls to optimize
(when another optimization is ongoing), so it's not possible for the Optimizer to store all EvaluatorParameters either. Thus, we'll have to define a new structure when implementing a stateful optimizer.
@bgchun commented that we need to introduce hysteresis, and avoid applying optimization when the estimated cost is not that beneficial. For this, we need to track the history of the cost in somewhere like Optimizer
or OptimizationOrchestrator
.