Bug#1014278: statsmodels: s390x fails TestDynamicFactor test_mle with scipy 1.8 and pythran
Drew Parsons
dparsons at debian.org
Sun Jul 3 12:28:35 BST 2022
Source: statsmodels
Version: 0.13.2+dfsg-2
Severity: normal
scipy 1.8.1 has been recently uploaded to unstable.
statsmodel is giving a test error on s390x:
____________________ TestDynamicFactor_ar2_errors.test_mle _____________________
self = <statsmodels.tsa.statespace.tests.test_dynamic_factor.TestDynamicFactor_ar2_errors object at 0x3ff4e18ff70>
def test_mle(self):
with warnings.catch_warnings(record=True):
# Depending on the system, this test can reach a greater precision,
# but for cross-platform results keep it at 1e-2
mod = self.model
res1 = mod.fit(maxiter=100, optim_score='approx', disp=False)
res = mod.fit(
res1.params, method='nm', maxiter=10000,
optim_score='approx', disp=False)
# Added rtol to catch spurious failures on some platforms
> assert_allclose(res.llf, self.results.llf, atol=1e-2, rtol=1e-4)
E AssertionError:
E Not equal to tolerance rtol=0.0001, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1.11132149
E Max relative difference: 0.00182958
E x: array(606.308783)
E y: array(607.420104)
/usr/lib/python3/dist-packages/statsmodels/tsa/statespace/tests/test_dynamic_factor.py:614: AssertionError
It's just a question of tolerance, thought the tolerance required to
pass is a little higher than we'd prefer (would need absolute difference 1.2
instead of 0.01)
At the same time scipy has been configured to use pythran, introduced
in scipy 1.8.1-5. Because the s390x test machines have been flakey in
recent week, we missed the test of statsmodels against scipy 1.8.1
without pythran, so it's not clear if the test failure is due to scipy
1.8 itself, or due to scipy 1.8 using pythran 0.11.
In any case it's only one test among 16358, so one option is to just
skip this test on s390x, e.g.
import platform
@pytest.mark.skipif(platform.machine()=='s390x', reason="tolerance not reached on s390x")
def test_mle(self):
More information about the debian-science-maintainers
mailing list