-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add automatic checks that results don't change a lot when re-processing #32
Comments
Maybe we can just add a summary that is equivalent to summary but just compares the results to the old ones instead of writing it out? |
Or only store results as ascii for a sensible number of digits, so that on 64 bit computers there will be no differences, but any changes above ~ 1 milliarcsec would show up? |
If we make this change in printing of values we should also change to radians. Anyone that wants speed has to use radians as input / output, so would be better because then we can use the same functions for performance testing. And as far as I see changing from deg to radians has no drawbacks? |
Actually the summary table already kind of does this in the sense that when you commit it, you see genuine changes in accuracy. Right now if I look at the diff for the summary.txt file (not committed) I can clearly see regressions and the other values have all stayed the same. |
Then we probably need to reduce the number of digits, because now that I re-ran this I get differences in the generated results ascii files for all packages: |
@cdeil - for the coordinate files yes, but I think the important one is the summary file. Do you get differences on every line there? |
@cdeil - see #34, many of the differences are real (at least in the astropy files). But it is valid to ask if we can reduce the precision in these files. I guess we should decide on what we consider to be a sufficient resolution threshold and that will dictate the precision. What about 7 decimal places/<1mas? |
We should make sure we use So how about using radians to store results in ascii and using 10 digits (to have a huge safety margin).
And we should store the version numbers of the packages and a date / username / machine-ID in the generated output. |
I just re-ran the benchmarks and get a diff like this, i.e. differences wrt your machine are in the ~15th digit and we should just store a few digits less in the generated text files to get rid of this annoyance.
|
Do you get any differences now? |
The values are still stored in degrees by the way. I don't think that really matters vs radians since this is just the storage format, irrespective of what we use for the calculations? |
With these changes, |
I have this one case where there's a difference in the 12th significant digit:
Really this shouldn't happen with 64-bit calculations. Should we investigate why the Astropy calculation gives ~ 1e4 machine EPS differences on your machine and mine? Or just reduce the number of digits by one? |
And for
|
@cdeil - 64-bit calculations don't always preserve all significant digits especially with trigonometric functions, etc. so maybe this is not surprising. If it's just one line every so often, maybe it's not a big problem? For astrolib it does seem an issue though. |
Sure ... there should be differences at the EPS or 10 x EPS level, but not 1000 x EPS for simple trigonometry and matrix algebra. |
Let's try to debug the astrolib issue ... which version are you using? is there a way to check if it uses 32 bits internally? |
I'm using the latest
|
There is an
But I'm not sure if that means much. Are your values always offset in same direction, or random? |
I have to run for now so won't have time to look into astrolib issue further, but let me know if there are any tests you want me to do here! |
Are you using this My
This is the diff I get with respect to your version is here: Manually looking at Maybe we should just list this as a "known issue" in the README for now ... I don't know a quick way to debug / fix this issue and it's not really important ... we mainly care for |
@cdeil - I'm using that too. I agree we don't really care in this case, at least not until we start implementing the ecliptic transformation. |
Maybe relevant: #11 (comment) |
I'm closing this old issue. The conclusion is that we simply store results with a well-chosen number of digits in ascii tables and then use git diff to notice when something changes. All that's left to be done in my opinion is #45 |
We need some
diff
functionality that checks that results didn't change significantly with re-processing.Without that this is a maintenance nightmare ... every time we re-run the benchmarks new issues can creep in (different machine, different numpy, changes in the coordinates packages).
We could do asserts on the summary statistics like min / mean / max differences ... not sure how to best set this up so that it doesn't become much work, but scales to more coordinate systems (especially horizon with observers at different locations).
The text was updated successfully, but these errors were encountered: