Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: restore optimizer settings after fits #362

Merged
merged 3 commits into from
Aug 29, 2022

Conversation

alexander-held
Copy link
Member

@alexander-held alexander-held commented Aug 29, 2022

When performing fits via the fit API (e.g. MLEs or pyhf.infer.hypotest via fit.limit / fit.significance), the optimizer is set to Minuit by cabinetry via pyhf.set_backend. Previously it just stayed this way, but now it instead gets set back to the initial settings (e.g. back to scipy, which is the pyhf default).

Now that the second RC for pyhf 0.7.0 is out, the integration test tolerance has to be slightly relaxed for CI to pass. Unclear why #361 is not affected by this. Locally a change in result bisects to scikit-hep/pyhf#1919, but the difference is so small that it likely is down to floating point differences amplifying in the post-fit yield uncertainty calculation.

* restore original pyhf optimizer settings after fits (for which Minuit is used by cabinetry)
* slightly relax tolerance in integration test

@codecov
Copy link

codecov bot commented Aug 29, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (c501013) compared to base (724e5f8).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #362   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         2001      2009    +8     
  Branches       326       326           
=========================================
+ Hits          2001      2009    +8     
Impacted Files Coverage Δ
src/cabinetry/fit/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alexander-held alexander-held merged commit 96b15c3 into master Aug 29, 2022
@alexander-held alexander-held deleted the feat/reset-optimizer branch August 29, 2022 23:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant