You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The class description of probability_below_threshold acquisition function says that threshold can be a float or TensorType. However, at initialization with threshold a TensorType, the tf.debugging.assert_scalar fails and errors out.
To reproduce
Steps to reproduce the behaviour:
create a problem with the ProbabilityOfFeasibility acquisition function (or test with the probability_below_threshold class directly)
give as threshold argument a TensorType (this is useful when a modelstack is used and a different threshold is necessary for each constraint the model learns)
init will fail and say, e.g.: "ValueError: Expected scalar shape, saw shape: (1, 2)"
if you try this with a float as threshold, it does not error.
Include a minimal reproducible code example if relevant.
Expected behaviour
A TensorType should be supported. I commented the assertion and then it gave me correct results with the TensorType. So, the assertion should be changed to check for scalars and tensortypes.
System information
OS: WSL
Python version: 3.11.6
Trieste version: 3.3.4 (but I saw that the latest version still has this assertion)
TensorFlow version: 2.15.0
GPflow version: 2.9.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
The class description of probability_below_threshold acquisition function says that threshold can be a float or TensorType. However, at initialization with threshold a TensorType, the tf.debugging.assert_scalar fails and errors out.
To reproduce
Steps to reproduce the behaviour:
Include a minimal reproducible code example if relevant.
Expected behaviour
A TensorType should be supported. I commented the assertion and then it gave me correct results with the TensorType. So, the assertion should be changed to check for scalars and tensortypes.
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: