secondmind-labs / trieste

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

Use int64 when calculating data size in split_acquisition_function #795

Closed khurram-ghani closed 8 months ago

khurram-ghani commented 8 months ago

Related issue(s)/PRs: None

Summary

Use int64 to calculate the input tensor size when splitting acquisition functions. Otherwise, we overflow for large tensors, e.g. of shape [30000, 1000, 100].

It is tricky to add a unit test to cover the limit, as we run into memory issues. Using mocking or sparse-tensors gets a bit messy, so skipping unit testing for this simple change.

Fully backwards compatible: yes

PR checklist