secondmind-labs / trieste

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

Allow qmc_normal_samples to be called with tensor parameter values #723

Closed ChrisMorter closed 1 year ago

ChrisMorter commented 1 year ago

Allow qmc_normal_samples to be called with tensor parameter values, this is useful when trying to call it in the context of a tf function, where it's more natural to use tensors than ints.

The only thing preventing this being possible already was the shape assertion. I'd argue that that is something which we can, and should, be able to verify using unit tests rather than runtime checks. I've added some tests to verify this, and have removed the assertion. I've also added some tests to check handling of invalid values.