Skip to content

Inconsistency between main branch and tagged release treatment of default POI name #2583

@MoAly98

Description

@MoAly98

Summary

While testing a setup in cabinetry, I ran into an inconsistent treatment of the default POI name between the main branch and the tagged release. In particular, it seems like the default POI name is set to mu in the tagged release, whereas in the main branch, it is set to None. I believe the behaviour in the main branch is the intended one (see #2328), so this should be patched onto the latest release .

Tagging @matthewfeickert @alexander-held

OS / Environment

Software:

    System Software Overview:

      System Version: macOS 14.4.1 (23E224)
      Kernel Version: Darwin 23.4.0

Steps to Reproduce

The behaviour can be demonstrated with the following snipped:

import pyhf
print(pyhf.__version__)

spec = {
    'channels': [
        {
            'name': 'singlechannel',
            'samples': [
                {
                    'name': 'signal',
                    'data': [24.0, 22.0],
                    'modifiers': [
                        {'name': 'xx', 'type': 'normfactor', 'data': None}
                    ],
                },
                {
                    'name': 'background',
                    'data': [50.0, 52.0],
                    'modifiers': [
                        {
                            'name': 'uncorr_bkguncrt',
                            'type': 'shapesys',
                            'data': [3.0, 7.0],
                        }
                    ],
                },
            ],
        }
    ]
}

model = pyhf.Model(spec, poi_name="xx")
print(model.config.poi_name)
print(pyhf.Model(model.spec).config.poi_name)

which results in:

# with main
0.7.1.dev287
xx
None

# with tagged release
0.7.6
xx 
InvalidModel: The parameter of interest 'mu' cannot be fit as it is not declared in the model specification.

File Upload (optional)

No response

Expected Results

With the tagged release, expect:

0.7.6
xx 
None

Actual Results

InvalidModel: The parameter of interest 'mu' cannot be fit as it is not declared in the model specification.

pyhf Version

0.7.6

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageNeeds a maintainer to categorize and assign

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions