Optimization failed. Call limit was reached in pyhf.infer.mle.fit #1751
-
Dear pyhf developers, The error I am getting is similar to #1577, as below - File "/afs/cern.ch/user/s/ssaha/.local/lib/python3.8/site-packages/pyhf/optimize/mixins.py", line 61, in _internal_minimize
assert result.success
AssertionError
Traceback (most recent call last):
File "/afs/cern.ch/user/s/ssaha/.local/lib/python3.8/site-packages/pyhf/optimize/mixins.py", line 61, in _internal_minimize
assert result.success
AssertionError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "asimovfit.py", line 20, in <module>
result, result_obj = pyhf.infer.mle.fit(
File "/afs/cern.ch/user/s/ssaha/.local/lib/python3.8/site-packages/pyhf/infer/mle.py", line 131, in fit
return opt.minimize(
File "/afs/cern.ch/user/s/ssaha/.local/lib/python3.8/site-packages/pyhf/optimize/mixins.py", line 184, in minimize
result = self._internal_minimize(
File "/afs/cern.ch/user/s/ssaha/.local/lib/python3.8/site-packages/pyhf/optimize/mixins.py", line 64, in _internal_minimize
raise exceptions.FailedMinimization(result)
pyhf.exceptions.FailedMinimization: Optimization failed. Call limit was reached. I have followed the comments on #1577, about histosys, which are absolute values and not relative to the nominal values. Following is the output for I am going to try with setting the maximum iteration now to see if I get successful fit. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi Shreya, increasing the number of iterations via |
Beta Was this translation helpful? Give feedback.
Hi Shreya, increasing the number of iterations via
maxiter
should resolve this issue (as in #1577 (comment)). I see that you are using MINUIT, you can also try out different fit strategies (strategy
) or increase your tolerance (tolerance
) to potentially trade precision for less steps to convergence.