secondmind-labs / trieste

A Bayesian optimization toolbox built on TensorFlow
Apache License 2.0
212 stars 42 forks source link

Allow TRs to be created with empty/single region #783

Closed khurram-ghani closed 10 months ago

khurram-ghani commented 10 months ago

Related issue(s)/PRs: None

Summary

This PR updates batch trust-region classes to allow init_subspaces to be empty. The request came from this discussion. Default subspaces are created if init_subspaces is None, with the number of spaces equal to the batch_size/num_query_points in the base rule.

Unfortunately, there is no mechanism or concept in the base AcquistionRule for batch size. So this PR uses the dynamic type of the base rule, with current support for EfficientGlobalOptimization.

This PR also allows users to specify a single init-subspace more easily. That is, init_subspaces can now be None, a single value or a sequence.

Fully backwards compatible: yes

PR checklist