Bug#966712: statsmodels: debci tests fail
Drew Parsons
dparsons at debian.org
Sun Aug 2 12:21:10 BST 2020
Source: statsmodels
Severity: normal
Three statsmodels debci tests (autopkgtest) are failing against
scipy 1.5.2:
../../../../usr/lib/python3/dist-packages/statsmodels/base/tests/test_optimize.py::test_full_output_false FAILED [ 1%]
../../../../usr/lib/python3/dist-packages/statsmodels/base/tests/test_optimize.py::test_full_output FAILED [ 1%]
../../../../usr/lib/python3/dist-packages/statsmodels/regression/tests/test_rolling.py::test_plot FAILED [ 30%]
Error traces:
=================================== FAILURES ===================================
____________________________ test_full_output_false ____________________________
reset_randomstate = None
@pytest.mark.smoke
def test_full_output_false(reset_randomstate):
# newton needs f, score, start, fargs, kwargs
# bfgs needs f, score start, fargs, kwargs
# nm needs ""
# cg ""
# ncg ""
# powell ""
for method in fit_funcs:
func = fit_funcs[method]
if method == "newton":
xopt, retvals = func(dummy_func, dummy_score, [1], (), {},
hess=dummy_hess, full_output=False, disp=0)
else:
xopt, retvals = func(dummy_func, dummy_score, [1], (), {},
full_output=False, disp=0)
assert_(retvals is None)
if method == "powell":
#NOTE: I think I reported this? Might be version/optimize API
# dependent
> assert_(xopt.shape == () and xopt.size == 1)
E AssertionError
/usr/lib/python3/dist-packages/statsmodels/base/tests/test_optimize.py:53: AssertionError
_______________________________ test_full_output _______________________________
reset_randomstate = None
def test_full_output(reset_randomstate):
for method in fit_funcs:
func = fit_funcs[method]
if method == "newton":
xopt, retvals = func(dummy_func, dummy_score, [1], (), {},
hess=dummy_hess, full_output=True, disp=0)
else:
xopt, retvals = func(dummy_func, dummy_score, [1], (), {},
full_output=True, disp=0)
assert_(retvals is not None)
assert_('converged' in retvals)
if method == "powell":
#NOTE: I think I reported this? Might be version/optimize API
# dependent
> assert_(xopt.shape == () and xopt.size == 1)
E AssertionError
/usr/lib/python3/dist-packages/statsmodels/base/tests/test_optimize.py:75: AssertionError
__________________________________ test_plot ___________________________________
@pytest.mark.matplotlib
def test_plot():
import matplotlib.pyplot as plt
y, x, w = gen_data(250, 3, True, pandas=True)
fmla = 'y ~ 1 + x0 + x1 + x2'
data = pd.concat([y, x], axis=1)
mod = RollingWLS.from_formula(fmla, window=100, data=data, weights=w)
res = mod.fit()
fig = res.plot_recursive_coefficient()
assert isinstance(fig, plt.Figure)
res.plot_recursive_coefficient(variables=2, alpha=None,
figsize=(30, 7))
res.plot_recursive_coefficient(variables='x0', alpha=None,
figsize=(30, 7))
res.plot_recursive_coefficient(variables=[0, 2], alpha=None,
figsize=(30, 7))
res.plot_recursive_coefficient(variables=['x0'], alpha=None,
figsize=(30, 7))
res.plot_recursive_coefficient(variables=['x0', 'x1', 'x2'], alpha=None,
figsize=(30, 7))
with pytest.raises(ValueError, match='variable x4 is not an integer'):
res.plot_recursive_coefficient(variables='x4')
fig = plt.Figure()
with pytest.warns(UserWarning, match="tight_layout"):
> out = res.plot_recursive_coefficient(fig=fig)
E Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) matching ('tight_layout') was emitted. The list of emitted warnings is: [MatplotlibDeprecationWarning('savefig() got unexpected keyword argument "dpi" which is no longer supported as of 3.3 and will become an error two minor releases later')].
/usr/lib/python3/dist-packages/statsmodels/regression/tests/test_rolling.py:260: Failed
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.7.0-2-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
More information about the debian-science-maintainers
mailing list