secondmind-labs / trieste

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

Fix ask_tell global `dataset_len` detection #853

Closed khurram-ghani closed 1 month ago

khurram-ghani commented 1 month ago

Related issue(s)/PRs: None

Summary

Quick fix for dataset_len detection. tf.unique returns a list of indices of the same length as the input, so we should use unique_lens to check the length instead.

Fully backwards compatible: yes

PR checklist