Bug#1095348: iminuit: FTBFS: AssertionError: E Not equal to tolerance rtol=0.1, atol=0

Santiago Vila sanvila at debian.org
Fri Feb 7 12:11:39 GMT 2025


Package: src:iminuit
Version: 2.30.0-1
Severity: serious
Tags: ftbfs trixie sid

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
=================================== FAILURES ===================================
_________________________ test_Template_with_model_2D __________________________

    def test_Template_with_model_2D():
        truth1 = (1.0, 0.1, 0.2, 0.3, 0.4, 0.5)
        x1, y1 = mvnorm(*truth1[1:]).rvs(size=int(truth1[0] * 1000), random_state=1).T
        truth2 = (1.0, 0.2, 0.1, 0.4, 0.3, 0.0)
        x2, y2 = mvnorm(*truth2[1:]).rvs(size=int(truth2[0] * 1000), random_state=1).T
    
        x = np.append(x1, x2)
        y = np.append(y1, y2)
        w, xe, ye = np.histogram2d(x, y, bins=(3, 5))
    
        def model(xy, n, mux, muy, sx, sy, rho):
            return n * 1000 * mvnorm(mux, muy, sx, sy, rho).cdf(np.transpose(xy))
    
        x3, y3 = mvnorm(*truth2[1:]).rvs(size=int(truth2[0] * 10000), random_state=2).T
        template = np.histogram2d(x3, y3, bins=(xe, ye))[0]
    
        cost = Template(w, (xe, ye), (model, template))
        assert cost.ndata == np.prod(w.shape)
        m = Minuit(cost, *truth1, 1)
        m.limits["x0_n", "x0_sx", "x0_sy"] = (0, None)
        m.limits["x0_rho"] = (-1, 1)
        m.migrad()
        assert m.valid
>       assert_allclose(m.values, truth1 + (1e3,), rtol=0.1)
E       AssertionError: 
E       Not equal to tolerance rtol=0.1, atol=0
E       
E       Mismatched elements: 6 / 7 (85.7%)
E       Max absolute difference among violations: 997.23956113
E       Max relative difference among violations: 0.99921615
E        ACTUAL: array([1.999216, 0.155654, 0.146317, 0.363123, 0.360546, 0.18838 ,
E              2.760439])
E        DESIRED: array([1.e+00, 1.e-01, 2.e-01, 3.e-01, 4.e-01, 5.e-01, 1.e+03])

tests/test_cost.py:2078: AssertionError
=========================== short test summary info ============================
SKIPPED [1] tests/test_without_ipywidgets.py:5: could not import 'ipywidgets': No module named 'ipywidgets'
SKIPPED [1] tests/test_without_numba.py:6: could not import 'numba': No module named 'numba'
SKIPPED [1] tests/test_core.py:124: could not import 'numba': No module named 'numba'
SKIPPED [5] tests/test_cost.py:63: could not import 'jacobi': No module named 'jacobi'
SKIPPED [44] tests/test_cost.py:68: could not import 'jacobi': No module named 'jacobi'
SKIPPED [11] tests/test_cost.py:73: could not import 'jacobi': No module named 'jacobi'
SKIPPED [1] tests/test_describe.py:229: could not import 'pydantic.types': No module named 'pydantic'
SKIPPED [1] tests/test_describe.py:252: could not import 'annotated_types': No module named 'annotated_types'
SKIPPED [1] tests/test_draw.py:140: could not import 'ipywidgets': No module named 'ipywidgets'
SKIPPED [1] tests/test_draw.py:228: could not import 'ipywidgets': No module named 'ipywidgets'
SKIPPED [1] tests/test_draw.py:244: could not import 'ipywidgets': No module named 'ipywidgets'
SKIPPED [1] tests/test_minuit.py:1490: could not import 'numba': No module named 'numba'
SKIPPED [1] tests/test_repr.py:347: could not import 'unicodeitplus': No module named 'unicodeitplus'
SKIPPED [1] tests/test_util.py:415: could not import 'numba': No module named 'numba'
SKIPPED [1] tests/test_util.py:441: could not import 'numba': No module named 'numba'
FAILED tests/test_cost.py::test_Template_with_model_2D - AssertionError: 
1 failed, 599 passed, 72 skipped in 9.41s
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_iminuit/build; python3.12 -m pytest -W ignore::DeprecationWarning
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_iminuit/build; python3.13 -m pytest -W ignore::DeprecationWarning
.....s.............sssssssss...ssss.......ssssssss.sss......ssss.ssss... [ 10%]
.......ss.s.........ssss.ssss.ss.s.....ssssssssss.ss...........s....s... [ 21%]
...................................F...................................s [ 32%]
s..........................sss.......................................... [ 42%]
........................................................................ [ 53%]
......................................................................s. [ 64%]
...........................................................s............ [ 75%]
........................................................................ [ 85%]
.........................................................ss............. [ 96%]
......................                                                   [100%]
=================================== FAILURES ===================================
_________________________ test_Template_with_model_2D __________________________

    def test_Template_with_model_2D():
        truth1 = (1.0, 0.1, 0.2, 0.3, 0.4, 0.5)
        x1, y1 = mvnorm(*truth1[1:]).rvs(size=int(truth1[0] * 1000), random_state=1).T
        truth2 = (1.0, 0.2, 0.1, 0.4, 0.3, 0.0)
        x2, y2 = mvnorm(*truth2[1:]).rvs(size=int(truth2[0] * 1000), random_state=1).T
    
        x = np.append(x1, x2)
        y = np.append(y1, y2)
        w, xe, ye = np.histogram2d(x, y, bins=(3, 5))
    
        def model(xy, n, mux, muy, sx, sy, rho):
            return n * 1000 * mvnorm(mux, muy, sx, sy, rho).cdf(np.transpose(xy))
    
        x3, y3 = mvnorm(*truth2[1:]).rvs(size=int(truth2[0] * 10000), random_state=2).T
        template = np.histogram2d(x3, y3, bins=(xe, ye))[0]
    
        cost = Template(w, (xe, ye), (model, template))
        assert cost.ndata == np.prod(w.shape)
        m = Minuit(cost, *truth1, 1)
        m.limits["x0_n", "x0_sx", "x0_sy"] = (0, None)
        m.limits["x0_rho"] = (-1, 1)
        m.migrad()
        assert m.valid
>       assert_allclose(m.values, truth1 + (1e3,), rtol=0.1)
E       AssertionError: 
E       Not equal to tolerance rtol=0.1, atol=0
E       
E       Mismatched elements: 6 / 7 (85.7%)
E       Max absolute difference among violations: 997.23956113
E       Max relative difference among violations: 0.99921615
E        ACTUAL: array([1.999216, 0.155654, 0.146317, 0.363123, 0.360546, 0.18838 ,
E              2.760439])
E        DESIRED: array([1.e+00, 1.e-01, 2.e-01, 3.e-01, 4.e-01, 5.e-01, 1.e+03])

tests/test_cost.py:2078: AssertionError
=========================== short test summary info ============================
SKIPPED [1] tests/test_without_ipywidgets.py:5: could not import 'ipywidgets': No module named 'ipywidgets'
SKIPPED [1] tests/test_without_numba.py:6: could not import 'numba': No module named 'numba'
SKIPPED [1] tests/test_core.py:124: could not import 'numba': No module named 'numba'
SKIPPED [5] tests/test_cost.py:63: could not import 'jacobi': No module named 'jacobi'
SKIPPED [44] tests/test_cost.py:68: could not import 'jacobi': No module named 'jacobi'
SKIPPED [11] tests/test_cost.py:73: could not import 'jacobi': No module named 'jacobi'
SKIPPED [1] tests/test_describe.py:229: could not import 'pydantic.types': No module named 'pydantic'
SKIPPED [1] tests/test_describe.py:252: could not import 'annotated_types': No module named 'annotated_types'
SKIPPED [1] tests/test_draw.py:140: could not import 'ipywidgets': No module named 'ipywidgets'
SKIPPED [1] tests/test_draw.py:228: could not import 'ipywidgets': No module named 'ipywidgets'
SKIPPED [1] tests/test_draw.py:244: could not import 'ipywidgets': No module named 'ipywidgets'
SKIPPED [1] tests/test_minuit.py:1490: could not import 'numba': No module named 'numba'
SKIPPED [1] tests/test_repr.py:347: could not import 'unicodeitplus': No module named 'unicodeitplus'
SKIPPED [1] tests/test_util.py:415: could not import 'numba': No module named 'numba'
SKIPPED [1] tests/test_util.py:441: could not import 'numba': No module named 'numba'
FAILED tests/test_cost.py::test_Template_with_model_2D - AssertionError: 
1 failed, 599 passed, 72 skipped in 8.86s
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_iminuit/build; python3.13 -m pytest -W ignore::DeprecationWarning
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12 3.13" returned exit code 13
make: *** [debian/rules:17: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202502/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:iminuit, so that this is still
visible in the BTS web page for this package.

Thanks.



More information about the debian-science-maintainers mailing list