Skip to content

0.6.0 Model API Change

Latest
Compare
Choose a tag to compare
@JasonKChow JasonKChow released this 18 Dec 19:06
· 7 commits to release since this release

Major changes:

Warning, the model API has changed, live experiments using configs should not break but custom code used in post-hoc analysis may not be compatible.

  • Models no longer possess bounds (lb/ub attributes in the initialization and the corresponding attributes are removed from the API).
  • Models require the dim argument for initialization (i.e., dim is no longer an optional argument).
    • The models can evaluate points outside of the bounds (which defines the search space, not the model's bounds). The only thing the models should know is the dimensionality of the space.
  • Models no longer have multiple methods that should not be directly bound to the models (e.g., dim_grid() or get_max()). These are replaced by new functions in the model.utils submodule that accepts our models and the bounds to work on.
    • Notice that it could be different bounds relative to the search space's bound, affording extra flexibility.
    • While it is still possible access these functions with the Strategy class, it is recommended that post-hoc analysis simply load the model, the data, and use these separate functions.
    • We are looking to improve the ergonomics of post-hoc analysis with a simplified API to load data and model from DBs without needing to replay, the next release will further bring more changes towards this goal.
  • Approximate GP Models (like the GPClassificationModel) now accept a new inducing point allocator class to determine the inducing points instead of selecting the algorithm using a string argument.
    • If inducing point methods were not modified before by the config, then nothing needs to change. To change the inducing point method, the inducing_point_method option in Configs need to be the exact InducingPointAllocator object (e.g., GreedyVarianceReduction or KMeansAllocator).
  • The new default inducing point allocator for models is the GreedyVarianceReduction
    • This should yield models that are at least as good as before while generally being more efficient to fit the model. To revert to the old default, use KMeansAllocator.
  • Fixed parameters can now be defined a strings and the server will be able to handle this seamlessly.

Bug fixes:

  • Query messages to the server can now handle models that would return values with gradients.
  • Query responses will now correctly unpack dimensions.
  • Query responses now respect transforms.
  • Prediction queries now can actually predict in probability_space.
  • Whitespaces are no longer meaningful in defining lists in config.
  • The greedy variance allocator (previously the "pivoted_chol" option) now work with models that augment the dimensionality.
  • MonotonicRejectionGP now respect the inducing point options from config.