Skip to content

Commit 5537ad9

Browse files
committed
quickly patch in skipping minuit for autodiff tests (silently passing)
1 parent ee56ec6 commit 5537ad9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_optim.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ def test_optim_uncerts_minuit(backend, source, spec, mu):
406406

407407
@pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])
408408
@pytest.mark.skip_numpy
409+
@pytest.mark.skip_numpy_minuit
409410
def test_optim_uncerts_autodiff(backend, source, spec, mu):
410411
pdf = pyhf.Model(spec)
411412
data = source['bindata']['data'] + pdf.config.auxdata
@@ -428,8 +429,10 @@ def test_optim_uncerts_autodiff(backend, source, spec, mu):
428429
return_uncertainties=True,
429430
)
430431
assert result.shape == (2, 2)
431-
# TODO: add proper numerical test for autodiff uncerts (does not match minuit at all)
432-
# assert pytest.approx([0.26418431, 0.0]) == pyhf.tensorlib.tolist(result[:, 1])
432+
# TODO: this does not match minuit at all (0.26418431) -- is that correct here?
433+
assert pytest.approx([0.6693815171034548, 0.0]) == pyhf.tensorlib.tolist(
434+
result[:, 1]
435+
)
433436

434437

435438
@pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])
@@ -465,6 +468,7 @@ def test_optim_correlations_minuit(backend, source, spec, mu):
465468

466469
@pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])
467470
@pytest.mark.skip_numpy
471+
@pytest.mark.skip_numpy_minuit
468472
def test_optim_correlations_autodiff(backend, source, spec, mu):
469473
pdf = pyhf.Model(spec)
470474
data = source['bindata']['data'] + pdf.config.auxdata

0 commit comments

Comments
 (0)