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
The evaluate and evaluateS1 functions need to be updated for GaussianLogLikelihood to allow with multiple signals. Note that GaussianLogLikelihoodKnownSigma runs without error and produces the expected output.
Running this updated example produces the error message copied below.
Relevant log output
----------------------------------------
Unexpected termination.
Current score: (-inf, -inf)
Current position:
6.14848282459801054e-01
4.47667093256804038e-01
----------------------------------------
Traceback (most recent call last):
File "/home/nicola/GitHub/PyBOP/pybop/costs/base_cost.py", line 88, in evaluate
return -self._evaluate(x, grad)
File "/home/nicola/GitHub/PyBOP/pybop/costs/_likelihoods.py", line 148, in _evaluate
y = self.problem.evaluate(x[: -self.n_outputs])
File "/home/nicola/GitHub/PyBOP/pybop/_problem.py", line 244, in evaluate
if np.any(x != self.x) and self._model.matched_parameters:
ValueError: operands could not be broadcast together with shapes (0,) (2,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nicola/GitHub/PyBOP/examples/scripts/spm_MLE.py", line 54, in<module>
x, final_cost = optim.run()
File "/home/nicola/GitHub/PyBOP/pybop/_optimisation.py", line 158, in run
x, final_cost = self._run_pints()
File "/home/nicola/GitHub/PyBOP/pybop/_optimisation.py", line 260, in _run_pints
fs = evaluator.evaluate(xs)
File "/home/nicola/GitHub/pybop-env/lib/python3.10/site-packages/pints/_evaluation.py", line 119, in evaluate
return self._evaluate(positions)
File "/home/nicola/GitHub/pybop-env/lib/python3.10/site-packages/pints/_evaluation.py", line 481, in _evaluate
scores[k] = self._function(x, *self._args)
File "/home/nicola/GitHub/PyBOP/pybop/costs/base_cost.py", line 60, in __call__
return self.evaluate(x, grad)
File "/home/nicola/GitHub/PyBOP/pybop/costs/base_cost.py", line 94, in evaluate
raise ValueError(f"Error in cost calculation: {e}")
ValueError: Error in cost calculation: operands could not be broadcast together with shapes (0,) (2,)
The text was updated successfully, but these errors were encountered:
Python Version
3.10.12
Describe the bug
The
evaluate
andevaluateS1
functions need to be updated forGaussianLogLikelihood
to allow with multiple signals. Note thatGaussianLogLikelihoodKnownSigma
runs without error and produces the expected output.Steps to reproduce the behaviour
Replace lines 46-47 in the spm_MLE.py example:
with:
Running this updated example produces the error message copied below.
Relevant log output
The text was updated successfully, but these errors were encountered: