Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Erratic test failure in test_cossin_separate #13207

Closed
endolith opened this issue Dec 6, 2020 · 2 comments · Fixed by #13209
Closed

TST: Erratic test failure in test_cossin_separate #13207

endolith opened this issue Dec 6, 2020 · 2 comments · Fixed by #13209
Milestone

Comments

@endolith
Copy link
Member

endolith commented Dec 6, 2020

Intermittent test failure during https://github.com/scipy/scipy/pull/4607/checks?check_run_id=1507492909

It seems like every time I push, something irrelevant fails somewhere. So I guess I should report each of these so the tests can be made more deterministic or find out what is causing the occasional failures?

Error message:


=================================== FAILURES ===================================
________________________ test_cossin_separate[float64] _________________________
scipy/linalg/tests/test_decomp_cossin.py:150: in test_cossin_separate
    assert_allclose(u1_2, u1, rtol=0., atol=10*np.finfo(dtype_).eps)
E   AssertionError: 
E   Not equal to tolerance rtol=0, atol=2.22045e-15
E   
E   Mismatched elements: 4514 / 6400 (70.5%)
E   Max absolute difference: 0.80714081
E   Max relative difference: 2.
E    x: array([[-0.012286, -0.063705, -0.046882, ...,  0.067121,  0.042775,
E           -0.038814],
E          [ 0.189033,  0.030199,  0.020188, ..., -0.041924,  0.135174,...
E    y: array([[ 0.012286,  0.063705, -0.046882, ...,  0.067121, -0.042775,
E            0.038814],
E          [-0.189033, -0.030199,  0.020188, ..., -0.041924, -0.135174,...
        X          = array([[-0.01224596,  0.11111008, -0.05583939, ...,  0.00863433,
        -0.02529069, -0.05999699],
       [-0.0022407...007,  0.07247924],
       [ 0.03405866, -0.05719033,  0.02516655, ...,  0.02967258,
         0.04382338,  0.01344216]])
        _          = 0
        dlw        = <fortran object>
        drv        = <fortran object>
        dtype_     = <class 'numpy.float64'>
        lwval      = 10780
        lwvals     = {'lwork': 10780}
        m          = 250
        p          = 80
        pfx        = 'or'
        q          = 170
        theta      = array([0.00541383, 0.00856157, 0.02748419, 0.02978311, 0.0718637 ,
       0.07503233, 0.07906807, 0.10008097, 0.115568...54, 0.99574407, 1.01896566, 1.02267398, 1.04836181,
       1.05885172, 1.09333057, 1.09419429, 1.13869658, 1.18214442])
        theta2     = array([0.00541383, 0.00856157, 0.02748419, 0.02978311, 0.0718637 ,
       0.07503233, 0.07906807, 0.10008097, 0.115568...54, 0.99574407, 1.01896566, 1.02267398, 1.04836181,
       1.05885172, 1.09333057, 1.09419429, 1.13869658, 1.18214442])
        u1         = array([[ 0.01228641,  0.06370488, -0.0468819 , ...,  0.06712145,
        -0.04277498,  0.03881356],
       [-0.1890334...168,  0.16848187],
       [-0.04684342,  0.05722923, -0.11347679, ..., -0.03189451,
        -0.1163678 , -0.03369047]])
        u1_2       = array([[-0.01228641, -0.06370488, -0.0468819 , ...,  0.06712145,
         0.04277498, -0.03881356],
       [ 0.1890334...168, -0.16848187],
       [ 0.04684342, -0.05722923, -0.11347679, ..., -0.03189451,
         0.1163678 ,  0.03369047]])
        u2         = array([[ 0.09401129,  0.09900626, -0.07349002, ...,  0.10217532,
        -0.0603292 ,  0.0933257 ],
       [-0.1354097...708, -0.01956046],
       [ 0.01315501, -0.09415009,  0.01847025, ..., -0.10221244,
         0.06842986,  0.55079481]])
        u2_2       = array([[-0.09401129, -0.09900626, -0.07349002, ...,  0.10217532,
        -0.0603292 ,  0.0933257 ],
       [ 0.1354097...708, -0.01956046],
       [-0.01315501,  0.09415009,  0.01847025, ..., -0.10221244,
         0.06842986,  0.55079481]])
        v1t        = array([[ 0.02071111, -0.12575399, -0.03392104, ...,  0.0561229 ,
         0.00561223,  0.10164257],
       [-0.0456795...206,  0.02532954],
       [-0.00360381, -0.02058857,  0.0545874 , ..., -0.0498076 ,
        -0.06530985,  0.11992337]])
        v1t_2      = array([[-0.02071111,  0.12575399,  0.03392104, ..., -0.0561229 ,
        -0.00561223, -0.10164257],
       [ 0.0456795...206,  0.02532954],
       [-0.00360381, -0.02058857,  0.0545874 , ..., -0.0498076 ,
        -0.06530985,  0.11992337]])
        v2t        = array([[-0.18492015, -0.12474194,  0.07637733, ...,  0.0724234 ,
         0.02643485,  0.16669119],
       [ 0.1832701...928,  0.17164494],
       [-0.12861266,  0.02723643,  0.05142215, ..., -0.15568402,
        -0.10115197, -0.03535843]])
        v2t_2      = array([[ 0.18492015,  0.12474194, -0.07637733, ..., -0.0724234 ,
        -0.02643485, -0.16669119],
       [-0.1832701...928, -0.17164494],
       [ 0.12861266, -0.02723643, -0.05142215, ...,  0.15568402,
         0.10115197,  0.03535843]])
=========================== short test summary info ============================
FAILED scipy/linalg/tests/test_decomp_cossin.py::test_cossin_separate[float64]
= 1 failed, 30316 passed, 2066 skipped, 10992 deselected, 77 xfailed, 5 xpassed in 622.38s (0:10:22) =

   Normal return from subroutine COBYLA

   NFVALS =   50   F = 2.485185E+01    MAXCV = 1.999965E-10
   X = 4.955358E+00   6.666553E-01

 NNLS quitting on iteration count.

Scipy/Numpy/Python version information:

Nightly CPython (3.9)

@ilayn
Copy link
Member

ilayn commented Dec 6, 2020

Yeah @WarrenWeckesser already brought this in #11524 but then I forgot. I'll take a look

@ilayn
Copy link
Member

ilayn commented Dec 7, 2020

It looks like we didn't set the random seed in the test and hence the intermittent failures. I'll send a PR now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants