scikit-hep / cabinetry

design and steer profile likelihood fits
https://cabinetry.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

feat: make POI optional in config and allow POI customization for inference #348

Closed alexander-held closed 2 years ago

alexander-held commented 2 years ago

The changes in https://github.com/scikit-hep/pyhf/pull/1638 and https://github.com/scikit-hep/pyhf/pull/1636 made POIs in pyhf workspaces optional. This means they can also be optional for the cabinetry config when building models. If not specified, the POI defaults to "" which is interpreted as "no POI" by pyhf.

A new keyword argument poi_name was added to fit.ranking and fit.limit to override the POI given in the model config.

Also fixing a deprecation warning observed in a test.

resolves #347

* POI is now an optional configuration argument
* added ability to set POI via poi_name keyword arguments in fit.ranking and fit.limit
* fixed pytest deprecation warning in a test
codecov[bot] commented 2 years ago

Codecov Report

Merging #348 (c08ee0e) into master (a237589) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #348   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1876      1902   +26     
  Branches       298       303    +5     
=========================================
+ Hits          1876      1902   +26     
Impacted Files Coverage Δ
src/cabinetry/fit/__init__.py 100.00% <100.00%> (ø)
src/cabinetry/model_utils.py 100.00% <100.00%> (ø)
src/cabinetry/workspace.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a237589...c08ee0e. Read the comment docs.