iminuit v2.32.0 causes a change in behavior when "fitting" functions with no free parameters. Instead of reporting a Hessian with all zeros, the Hessian is no longer defined and the .correlation() call fails:
import pyhf
pyhf.set_backend("numpy", "minuit")
model = pyhf.simplemodels.uncorrelated_background(
signal=[10.0], bkg=[70.0], bkg_uncertainty=[10.0]
)
data = [80] + model.config.auxdata
pyhf.infer.mle.fit(data, model, fixed_params=[True, True])
->
[...]
File "[...]/pyhf/src/pyhf/optimize/opt_minuit.py", line 141, in _minimize
corr = hess_inv.correlation()
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'correlation'
Earlier versions of iminuit, such as 2.31.3, report the warning "IMinuitWarning: Hesse called with all parameters fixed" but still return a covariance matrix full of zeros. This special case should be handled in pyhf to avoid a runtime crash with the latest version.