Closed avalentino closed 1 year ago
Good morning, @avalentino! I have had a busy few months, but am now reading back through my open Skyfield issues, and I see that I never replied to this one—probably because I didn't have a way to reproduce the problem locally, so I wasn't sure how to get started answering.
I wish that I knew how to improve Skyfield's math to recover the precision it's customarily had with floating point, but for the moment you have my go-ahead to try submitting a pull request that simply relaxes these limits—as you note, these aren't hugely different numbers.
Thanks @brandon-rhodes, just opened PR #844
@avalentino — Two quick notes: first, I think we'll need to adjust the commit message a bit, because it's not a NumPy problem; I was just able to run the tests successfully against NumPy 1.24.2 here on my laptop. My guess would be that the actual problem is broken (by which I mean non-IEEE) floating point on the platform that Debian uses for its test cluster — do you have any idea whether the platform is an unusual processor type? Test failures like this always seem the result of running floating point tests on the cloud.
Oh, and, my other note: could you revert the _IERS2
change? I should really do that as a separate diff.
Dear @brandon-rhodes
OK I can remove the commit regarding _IERS2
.
Regarding numpy
I would like to clarify that right now I'm running tests on my ubuntu 22.10 laptop.
I have performed tests with several configurations:
I agree that the core problem is in non-IEEE floating point. By the way it seems to me that the problem can be triggered changing the numpy version. From my tests the problem seems to be present only in newer versions of numpy but the problem could be rather in the build flags used for numpy or the libraries used (openblas vs mkl vs whatever)
None of the commit messages refers to numpy. Please feel free to change the PR title in the way you think is more appropriate.
@avalentino — Ah, yes, I mean to reference the PR title, not the commit messages, thanks!
So, thank you for providing such detailed test results! I had thought that the failures were only out on a build server somewhere; I had no idea you were able to reproduce them locally, as that's something I've never been able to do successfully! Since the tests all pass on my own laptop with numpy==1.24.2
, I had assumed they would pass anywhere, so it's an unhappy result that the exact same NumPy version fails for you.
Someday I should take a couple of weeks and try to track down what's going on at the machine level with these tests. But I suspect that I won't be tackling that odyssey soon.
What processor does your machine use? Mine looks like a Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz
.
On a lighter note, did you see the following blog post from last year? 🙂
https://moyix.blogspot.com/2022/09/someones-been-messing-with-my-subnormals.html
In any event, I think I'll go ahead and merge this as soon as I can confirm it won't change the IERS URL. Thanks!
My CPU is "Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz"
During a rebuild of the Debian archive we had 4 test failures. The tests were previously working and we thing that the issue could related to update of numpy (currently 1.23.5) or some of the other dependencies. Please find the relevant part of the log below.
I see that the
test_reverse_terra_with_zero_iterations
has been already fixed in git. For other test I see that the error only exceeds slightly the tolerance so I think that it should be fine to relax a little bit. Some guidance on how to solve/workaround the issue would be appreciated. If considered useful, I could open a PR with the proposed fix.