[JOSS Review] Automated test failed
molgor opened this issue · 2 comments
molgor commented
Hi @ghislainv,
The automated tests (located in tests
) failed. I'm appending the obtained output.
(conda-far) otus:forestatrisk juan$ py.test
========================================== test session starts ==========================================
platform darwin -- Python 3.7.7, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: /.../JOSS/forestatrisk
collected 17 items
test/test_get_started.py ......FF........ [ 94%]
test/test_import.py . [100%]
=============================================== FAILURES ================================================
_______________________________________ test_model_binomial_iCAR ________________________________________
gstart = {'adj': array([ 1, 11, 12, 0, 2, 11, 12, 13, 1, 3, 12, 13, 14, 2, 4, 13, 14,
15, 3, 5, 14, 15, 16, 4, ... 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5,
3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3]), ...}
def test_model_binomial_iCAR(gstart):
p = np.array([0.34388896, 0.29002158, 0.51594223, 0.48436339,
0.60838453, 0.61257058, 0.55034979, 0.58819568,
0.51087469, 0.58819568, 0.64149789, 0.57400436,
0.59570952, 0.63212285, 0.566676, 0.62562204,
0.55379459, 0.15644965, 0.61284327, 0.36638686,
0.55439297, 0.57325744, 0.62562204, 0.17995823,
0.4930868, 0.54641479, 0.59782004, 0.48159526,
0.62882886, 0.59831051, 0.76245777, 0.74576097,
0.77356767, 0.73863295, 0.78188891, 0.75056545,
0.60775752, 0.64978574, 0.74654465, 0.77378323,
0.53994416, 0.75852715, 0.77754366, 0.60053684,
0.71543739, 0.74565542, 0.7555028, 0.44598923,
0.76401273, 0.75953027, 0.49027142, 0.69610182,
0.75679461, 0.78543649, 0.76863321, 0.6209473,
0.77653139, 0.76182804, 0.78169681, 0.58816002,
0.50453473, 0.77980428, 0.76084413, 0.73054832,
0.78289747, 0.71858934, 0.78362842, 0.74702923,
0.67357571, 0.78940242, 0.75358937, 0.66791346,
0.75602843, 0.42494845, 0.77653139, 0.60509306,
0.60846943, 0.76187008, 0.73278992, 0.72792572,
0.47661681, 0.59456417, 0.71894598, 0.6731302,
0.74964489, 0.77247818, 0.78289747, 0.74200682,
0.78940242, 0.78508877, 0.73153419, 0.65636031,
0.78607775, 0.59738545, 0.72596162, 0.78216462,
0.75078253, 0.77527468, 0.69907386, 0.71991522])
> assert np.allclose(gstart["pred_icar"][0:100], p)
E assert False
E + where False = <function allclose at 0x10435e8c0>(array([0.38174266, 0.34110367, 0.49796017, 0.4767064 , 0.56710096,\n 0.57024475, 0.5418506 , 0.55263309, 0.512898...77, 0.67407704, 0.77655815, 0.57789 , 0.76288142,\n 0.77055253, 0.73327539, 0.76372531, 0.67347268, 0.68633676]), array([0.34388896, 0.29002158, 0.51594223, 0.48436339, 0.60838453,\n 0.61257058, 0.55034979, 0.58819568, 0.510874...19, 0.65636031, 0.78607775, 0.59738545, 0.72596162,\n 0.78216462, 0.75078253, 0.77527468, 0.69907386, 0.71991522]))
E + where <function allclose at 0x10435e8c0> = np.allclose
/../forestatrisk/test/test_get_started.py:132: AssertionError
_______________________________________________ test_rho ________________________________________________
gstart = {'adj': array([ 1, 11, 12, 0, 2, 11, 12, 13, 1, 3, 12, 13, 14, 2, 4, 13, 14,
15, 3, 5, 14, 15, 16, 4, ... 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5,
3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3]), ...}
def test_rho(gstart):
r = np.array([-3.72569484e-02, -1.16871478e-01, -1.82400711e-01,
2.13446770e-01, -6.44591325e-01, -9.89850864e-02,
1.10439030e-01, -2.31551563e-02, -3.30273946e-01,
-2.66995061e-01, -3.84426210e-01, 5.73572517e-02,
-5.73353804e-02, -3.12497338e-01, -8.37127591e-01,
7.62072575e-02, 3.86361945e-01, 1.26487021e-02,
-8.22069815e-02, -3.60656850e-01, -5.46586761e-01,
-4.17346094e-01, 1.05212875e+00, -4.32508096e-02,
-4.49589533e-01, -6.89872259e-01, -4.91230799e-01,
-3.84040358e-01, 5.67299746e-01, -2.10071117e-01,
-1.07456253e+00, -6.69339978e-01, -6.21974970e-01,
2.15020267e+00, -7.16437085e-02, -4.46424607e-01,
-2.17259138e-01, -3.30043032e-01, -2.59613996e-01,
2.68845283e-01, -3.78046974e-01, -5.18108829e-01,
-6.18235133e-01, -7.59652734e-01, 1.51771355e+00,
1.75357016e+00, -8.01814048e-02, 1.99270623e-01,
-1.75157345e-01, -6.10561635e-02, -1.26099802e-01,
-1.77864133e-01, -3.03381214e-01, -5.29892286e-01,
-5.47125418e-01, 1.30320979e+00, 2.37670385e+00,
4.97829325e-01, 8.88668246e-01, 3.92682659e-01,
-6.56913949e-03, -2.95774565e-01, -5.15489012e-01,
-6.01407176e-01, -5.67695385e-01, -6.48479745e-01,
1.47482553e+00, 1.45848019e+00, 4.05321503e-01,
1.06327906e+00, 4.37780456e-01, -1.12202021e-01,
-7.22139489e-01, -7.33312519e-01, -6.68442058e-01,
-7.76218335e-01, -8.02763852e-01, 1.41620727e+00,
1.56564133e+00, 1.24252305e+00, 9.07095194e-01,
4.38959947e-01, -2.95546782e-01, -4.92024764e-01,
-9.62965263e-01, -8.93107795e-01, -9.80673724e-01,
-9.94878624e-01, 1.41460696e+00, 1.38942057e+00,
1.97092977e+00, 1.06797639e+00, 4.36803818e-01,
2.15296806e-03, -6.14110567e-01, -7.76157636e-01,
-9.47693103e-01, -1.05424592e+00, -1.12226096e+00])
> assert np.allclose(gstart["rho"], r)
E assert False
E + where False = <function allclose at 0x10435e8c0>(array([ 0.0624157 , -0.15277958, -0.38287764, 0.23009508, -0.850125 ,\n -0.24314522, -0.19327062, -0.58031306, ...36883 , 1.16946349, 0.45945857, -0.15399801, -0.61728853,\n -0.6482013 , -0.57797415, -0.38994641, -0.25915156]), array([-3.72569484e-02, -1.16871478e-01, -1.82400711e-01, 2.13446770e-01,\n -6.44591325e-01, -9.89850864e-02, 1...3818e-01, 2.15296806e-03, -6.14110567e-01, -7.76157636e-01,\n -9.47693103e-01, -1.05424592e+00, -1.12226096e+00]))
E + where <function allclose at 0x10435e8c0> = np.allclose
/../forestatrisk/test/test_get_started.py:171: AssertionError
=========================================== warnings summary ============================================
../../../miniconda3/envs/conda-far/lib/python3.7/site-packages/osgeo/__init__.py:8
/../miniconda3/envs/conda-far/lib/python3.7/site-packages/osgeo/__init__.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
../../../miniconda3/envs/conda-far/lib/python3.7/site-packages/patsy/constraint.py:13
/../miniconda3/envs/conda-far/lib/python3.7/site-packages/patsy/constraint.py:13: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
from collections import Mapping
-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================================== short test summary info ========================================
FAILED test/test_get_started.py::test_model_binomial_iCAR - assert False
FAILED test/test_get_started.py::test_rho - assert False
=============================== 2 failed, 15 passed, 2 warnings in 51.58s ===============================
:100.0%, mean accept. rates= beta:0.350, rho:0.443
Is it my side?
I don't have much idea of what could it be. However, the getting started tutorial worked 100% and the installation process showed no problems.
Cheers,
Juan
kbarnhart commented
linking to joss-reviews/issues/2975
ghislainv commented
Thanks @molgor . Might be a problem associated to the random seed on different operating systems? But tests are running successfully on GitHub Actions using Ubuntu-20.04 (https://github.com/ghislainv/forestatrisk/actions), so I close the issue.