8000 [MRG+1] reduce decimal restriction in test_singular_values to avoid non-deterministic test failure by qinhanmin2014 · Pull Request #9162 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG+1] reduce decimal restriction in test_singular_values to avoid non-deterministic test failure #9162

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

Merged
merged 2 commits into from
Jun 28, 2017

Conversation

qinhanmin2014
Copy link
Member
@qinhanmin2014 qinhanmin2014 commented Jun 19, 2017

Reference Issue

Fixes #7893 (temporarily avoid it)

What does this implement/fix? Explain your changes.

Please refer to the issue.
test_singular_values sometimes fail and it seems unrelated to scikit-learn.
(CI become green after an empty commit)
For example in pull request #9108 :
https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.14629/job/t8udw2qky46u5ewm (fail)
https://ci.appveyor.com/project/sklearn-ci/scikit-learn/build/1.0.14695/job/8kovdaea238us3u2 (pass)
Before we find the reason, it may be better to reduce the decimal restriction in assert_array_almost_equal to avoid unecessary confusion.

Any other comments?

@jnothman
Copy link
Member

I am okay with this kind of fix. I think 6dp is too big a tolerance. Without looking at the failure I would have thought 9 or so. The difference occurs at the 11th dp and the test would, for instance, easily pass numpy.assert_allclose default relative tolerance of 1e-7.

This is all despite the fact that I'm still uncomfortable that there is some unknown source of indeterminacy. I suppose it's possible that AppVeyor uses subtly different machines??

@qinhanmin2014
Copy link
Member Author

@jnothman Thanks. I follow your instruction and that seems enough to avoid this problem. I have modified the main content of the pull request to mark that it only avoid the problem temporarily, or maybe we need to remain the issue open.

@jnothman
Copy link
Member

LGTM

@jnothman jnothman changed the title [MRG] reduce decimal restriction in test_singular_values to avoid non-deterministic test failure [MRG+1] reduce decimal restriction in test_singular_values to avoid non-deterministic test failure Jun 21, 2017
@jnothman jnothman added this to the 0.19 milestone Jun 21, 2017
@raghavrv
Copy link
Member

This LGTM. I'm merging this one. Are we okay with just modifying this specific test. There seem to be quite a few other tests comparing at 12 DP.

@raghavrv raghavrv merged commit c3f4483 into scikit-learn:master Jun 28, 2017
@qinhanmin2014
Copy link
Member Author

@raghavrv Thanks. To solve current issue, it seems enough since the wrong result in three known cases(please refer to the issue) are exactly the same. It only occurs occasionaly in a particular statement and similar issues are not reported(according to my search). But it is definitely better to know the exact reason behind it. So if it is necessary, maybe we can keep the issue open and change the milestone.

@qinhanmin2014 qinhanmin2014 deleted the my-feature-3 branch June 28, 2017 13:54
midinas pushed a commit to midinas/scikit-learn that referenced this pull request Jun 29, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

* change restriction
midinas pushed a commit to midinas/scikit-learn that referenced this pull request Jun 29, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

* change restriction
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

* change restriction
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

* change restriction
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

* change restriction
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

* change restriction
AishwaryaRK pushed a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

* change restriction
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

* change restriction
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
…on-deterministic test failure (scikit-learn#9162)

* reduce decimal restriction

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

Successfully merging this pull request may close these issues.

PCA singular value non-deterministic test failure on Appveyor
3 participants
0