Generalize AskTellOptimizer so that we can use it with non-trainable models.
AskTellOptimizer works as before (and still requires trainable models)
AskTellOptimizerNoTraining does no training at tell time and during initialization (and supports all models).
New AskTellOptimizerABC subclasses can be defined to incorporate other model handling into the tell stage.
Fully backwards compatible: no
Runtime behaviour unchanged, but Record, FrozenRecord and OptimizationResult are now also generic in the model type, which could affect type checking type-annotated code. The fix is to add model type annotations were appropriate.
PR checklist
[ ] The quality checks are all passing
[ ] The bug case / new feature is covered by tests
[ ] Any new features are well-documented (in docstrings or notebooks)
Related issue(s)/PRs: resolves #814
Summary
Generalize
AskTellOptimizer
so that we can use it with non-trainable models.AskTellOptimizer
works as before (and still requires trainable models)AskTellOptimizerNoTraining
does no training at tell time and during initialization (and supports all models).AskTellOptimizerABC
subclasses can be defined to incorporate other model handling into the tell stage.Fully backwards compatible: no
Runtime behaviour unchanged, but Record, FrozenRecord and OptimizationResult are now also generic in the model type, which could affect type checking type-annotated code. The fix is to add model type annotations were appropriate.
PR checklist