Skip to content

PCA singular value non-deterministic test failure on Appveyor #7893

Closed

Description

@amueller

See here:
https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.10151/job/k042tl5h0hp91iv9

======================================================================
FAIL: sklearn.decomposition.tests.test_pca.test_singular_values
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python35\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "C:\Python35\lib\site-packages\sklearn\decomposition\tests\test_pca.py", line 266, in test_singular_values
    np.linalg.norm(X_apca, "fro")**2.0, 12)
  File "C:\Python35\lib\site-packages\numpy\testing\utils.py", line 842, in assert_array_almost_equal
    precision=decimal)
  File "C:\Python35\lib\site-packages\numpy\testing\utils.py", line 665, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 12 decimals
(mismatch 100.0%)
 x: array(613.0583877392909)
 y: array(613.0583877392893)
sklearn.ensemble.tests.test_bagging.test_base_estimator: 5.2514s

Activity

  1. added this to the 0.19 milestone on Nov 16, 2016
  2. lesteve commented on Nov 17, 2016

    @lesteve
    Member

    I may be missing something but I think the build you are linking to is not a build from master but from the PR #7872 ...

    This is the latest build from master I can find on AppVeyor and it is all green:
    https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.10236

  3. amueller commented on Nov 17, 2016

    @amueller
    MemberAuthor

    The build is from a PR that didn't change anything in PCA though. I guess it's a non-deterministic failure?

  4. amueller commented on Nov 17, 2016

    @amueller
    MemberAuthor

    which is weird since it's arpack and we set a random state? I'm not entirely sure what the status of our initialization for arpack svds is though, I know there were some recent changes...

  5. dalmia commented on Nov 29, 2016

    @dalmia
    Contributor

    @amueller I want to work on the issue. Could you please guide me as to how can I get started with working on this?

  6. lesteve commented on Nov 29, 2016

    @lesteve
    Member

    I just noticed it happened more recently on master:
    https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.10302/job/p5gdb45li72pe6bi

    @dalmia this happens on Windows only and not deterministically. Maybe not the best issue if you do not have a Windows machine.

  7. dalmia commented on Nov 29, 2016

    @dalmia
    Contributor

    @amueller Yes, I don't. Thanks for letting me know.

  8. changed the title [-]PCA singluar value test failure on master[/-] [+]PCA singular value non-deterministic test failure on Appveyor[/+] on Nov 29, 2016
  9. qinhanmin2014 commented on Jun 19, 2017

    @qinhanmin2014
    Member

    It happened again in https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.14629/job/t8udw2qky46u5ewm (#9108). CI become green after an empty commit. The wrong result in three cases are exactly the same(wrong result:613.0583877392909, right result:613.0583877392893). In order to prevent such confusion, do you agree to change the decimal restriction in assert_array_almost_equal from 12 to 6(default value) ? It seems reasonable to me. @amueller @lesteve

  10. jnothman commented on Jun 19, 2017

    @jnothman
    Member
  11. qinhanmin2014 commented on Jun 19, 2017

    @qinhanmin2014
    Member

    @jnothman
    Thanks. I also feel strange. I read the source code and don't find any mistake currently. Since the error only happen for python3.5 in 32-bit Windows, maybe it's a bug for python3.5(new python) in 32-bit Windows(old Windows). With your support, I'll make a pull request today to close the issue.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions