secondmind-labs / trieste

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

Always build features so trajectories can be saved before being used #753

Closed khurram-ghani closed 1 year ago

khurram-ghani commented 1 year ago

Always build feature-functions using a dummy shape. This is important for tf.saved_model.save to work, in cases where the user hasn't called the trajectory yet. By calling build in __init__ we ensure all the variables always exist.

khurram-ghani commented 1 year ago

I presume the test for this will be in @uri-granta 's PR so no need to introduce a test here?

Yes, that is correct.