-
Notifications
You must be signed in to change notification settings - Fork 65
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
macos failure fix #423
macos failure fix #423
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #423 +/- ##
======================================
Coverage 98.0% 98.0%
======================================
Files 156 158 +2
Lines 3065 3074 +9
Branches 742 739 -3
======================================
+ Hits 3006 3015 +9
Misses 37 37
Partials 22 22 ☔ View full report in Codecov by Sentry. |
Great find @Bchass ! I did not think it would be this quick. To answer your question, another option is to use I usually rely on using I haven't had a chance to read the linked discussions in Note: The description of this PR is probably something we want to keep in mind for #63 |
Will do! I'll do some more testing with what you recommended later tonight or sometime during this long weekend. |
Final answer that was given from numpy: numpy/numpy#7726 (comment) More info to read upon later: https://peps.python.org/pep-0485/#absolute-tolerance-default Floating point numbers for |
Excellent sleuthing, @Bchass! Great find! I'm all good for this one to be merged. All good on your end too, @purva-thakre ? |
@vprusso How about we wait a little bit to check failures on the different ways to check for numpy array equality? We need to standardize this across all tests. Right now, tests use different options depending on who added the test. It's possible there are other options for this that have not been used by us. I want to search those options and have @Bchass test these out since they have access to a |
I agree with @purva-thakre to wait a bit. Want to break into some other tests. The interesting part is the test never failed locally on a mac. Only with GitHub Actions. |
This is only for this one test case. I'll try some more test cases after. |
@Bchass There was a similar issue in MItiq due to some changes I introduced to the code to satisfy @natestemen did a great job of looking for the source of the issue. His view as to why the tests passed locally on macos but not in Github actions was due to the differences in the resources available in both scenarios.
This is really weird though. I thought |
Thanks for the link to that issue. Maybe this is following in the same realm? I'm going to explore more and see if I can dig further into why |
@Bchass Could you please check if the following also pass or fail randomly?
So far, I am leaning towards using If we use |
All pass locally/remotely. |
Then, let's stick to using @vprusso Thought on this? |
Co-authored-by: Purva Thakre <[email protected]>
Going to go ahead and merge this PR. Thanks @Bchass ! |
Description
Resolves: #399
Same issue: scikit-learn/scikit-learn#10562 tests were failing only for
macos
withnp.testing.assert_allclose
.numpy/numpy#7726 discussion on why numpy informs users that
allclose
is the equivalent tonp.testing.assert_allclose
when they provide different default values.Another discussion: numpy/numpy#3183 (comment)
Based on both of these discussions, not much came out of them. It really comes down to maintainers to set the path forward for issues like this. It's hard to say what the core issue is exactly.
One can say that it's onnumpy/scikit
but on the other hand one can say that it's an issue withmacos
.From what I've read so far surrounding this issue, it's an issue with numpy. Not so much a bug though, more of a decision the maintainers of numpy made a long time ago.
Questions
For future tests going forward, what should be recommended ?
assert np.allclose
ornp.testing.assert_allclose
? It's a bit unknown when it comes tomacos
.assert np.allclose
unfortunately does not give the same amount of detail asnp.testing.assert_allclose
.Status