Skip to content
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

Forward AutodIff Compatibility #3

Merged
merged 10 commits into from
Sep 26, 2024

Conversation

jmurphy6895
Copy link
Contributor

I changed the internal time to be handled as seconds past JD_J2000 instead of DateTime to allow for automatic differentiation compatibility and changed some of the return types to handle more general inputs, namely ForwardDiff's Duals. Reverse Autodiff is blocked by not knowing how to handle the DCM struct at the moment but will be handled in a future PR.

The previous DateTime interfaces are still present they just internally convert the DateTime to the seconds past JD_J2000 and call the newer function.

@ronisbr
Copy link
Member

ronisbr commented Sep 25, 2024

Hi @jmurphy6895 !

Aweome PR, thank you very much! I just added some general comments, check, please, if they apply.

Copy link

codecov bot commented Sep 25, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@ronisbr
Copy link
Member

ronisbr commented Sep 25, 2024

Hi @jmurphy6895,

Can you please check if the failures are only related to test packages that cannot be installed in Julia 1.6? If so, can you modify the test script to ignore those tests in Julia 1.6? I plan to drop support for Julia 1.6 but it will take sometime to update all packages in SatelliteToolbox.jl ecosystem.

@jmurphy6895
Copy link
Contributor Author

Hey @ronisbr,

I don't see your comments on the PR, are they on a different branch or maybe not pushed?

As for the failure, yeah it looks like it's because of Julia 1.6:
LoadError: Unsatisfiable requirements detected for package FiniteDiff
...
restricted by julia compatibility requirements to versions: 2.0.0-2.22.0 or uninstalled — no versions left

I added a conditional to not run on v1.6

src/GravityModels/accelerations.jl Outdated Show resolved Hide resolved
src/GravityModels/accelerations.jl Outdated Show resolved Hide resolved
src/GravityModels/accelerations.jl Outdated Show resolved Hide resolved
@ronisbr
Copy link
Member

ronisbr commented Sep 25, 2024

Thanks @jmurphy6895 ! I forgot to push the comments :)

@jmurphy6895
Copy link
Contributor Author

I see why it's still failing, it's not the test it's the .toml compat, I'll loosen it and see if the tests still pass

@jmurphy6895
Copy link
Contributor Author

I'll get to these changes after work today

@jmurphy6895
Copy link
Contributor Author

W.r.t. to the failing CI, it looks like the DifferentiationInterface will not work with Julia 1.6 for FiniteDIff (Julia 1.6 requires <=v2.22 and DifferentiationInterface requires >=2.23)
Screenshot 2024-09-25 221841

I don't explicitly need the DifferentiationInterface package to test this, it will just make testing all the different AD backends very easy in the future. I'll defer to you on what you'd like to happen here

@ronisbr
Copy link
Member

ronisbr commented Sep 26, 2024

Hi @jmurphy6895 !

Let's ignore those errors. As soon as we merge this commit, I turn off the tests for Julia 1.6. The last thing (sorry, I missed it before): can you please return the version to 0.1.5? I prefer to have a separate commit with the version bump. After that, I will merge this PR and tag the new release :)

@jmurphy6895
Copy link
Contributor Author

@ronisbr Done!

@ronisbr
Copy link
Member

ronisbr commented Sep 26, 2024

Awesome! Let's the CI run and I will merge this! Thank you very much for the PR @jmurphy6895 !

@ronisbr ronisbr merged commit 80e4fc6 into JuliaSpace:main Sep 26, 2024
7 of 12 checks passed
@ronisbr
Copy link
Member

ronisbr commented Sep 26, 2024

Hi @jmurphy6895 !

I did some modifications:

  1. Fixed precompilation warnings.
  2. Improved docstrings (making them less verbose).
  3. Most important: fixed J2000.0 epoch definition. Your PR revealed a long-lasting bug between the code and the documentation. When we pass no time information, we fallback to J2000.0 epoch, which is 2000-01-01T12:00:00 instead of 2000-01-01T00:00:00. Hence, I modified everything to provide the coefficients at the correct definition of J2000.0 epoch.

@ronisbr
Copy link
Member

ronisbr commented Sep 26, 2024

Can you please test if I broke something related to autodiff? If not, I will tag the new release.

@jmurphy6895
Copy link
Contributor Author

LGTM, one step closer to a fully differentiable propagator!

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

Successfully merging this pull request may close these issues.

2 participants