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

Automatic Differentiation Compatibility #7

Merged
merged 5 commits into from
Nov 15, 2024

Conversation

jmurphy6895
Copy link
Contributor

Added support for automatic differentiation capabilities with minor typing changes and a few convenience functions.

Added tests to check for compatibility with ForwardDiff.jl via DifferentiationInterface.jl

@jmurphy6895
Copy link
Contributor Author

jmurphy6895 commented Oct 2, 2024

@ronisbr Here is the next update for the autodiff work. Don't run the tests yet, they will fail due to some issue in DifferentiationInterface.jl (See JuliaDiff/DifferentiationInterface.jl#525) But just to get some eyes on the new code in the meantime in case changes are needed.

@jmurphy6895
Copy link
Contributor Author

@ronisbr Ok, the issue was resolved, tests are passing and PR is ready for a full review whenever you have time

@ronisbr
Copy link
Member

ronisbr commented Oct 5, 2024

Hi @jmurphy6895 !

Thank you very much, I will take more time to analyze this because since it changes the return type of some functions, it might be breaking. If this modification breaks our current code on production, unfortunately we will need to postpone it a little bit until I have time to update everything.

@jmurphy6895
Copy link
Contributor Author

Sounds good, definitely understand. If it does break things, let me know if there's anything I can do to help

@ronisbr
Copy link
Member

ronisbr commented Oct 17, 2024

Hi @jmurphy6895

Just one feedback (sorry for the delay). Unfortunately the return type change caused a lot of errors in our algorithms :( I did not investigate to check if those are easy fixes or not. One question: can we somehow add autodiff without this modification?

@jmurphy6895
Copy link
Contributor Author

Hey @ronisbr, let me run some experiments, I think might have an idea or two, probably won't be able to track them down until this weekend or next week though

@jmurphy6895
Copy link
Contributor Author

@ronisbr I reverted the return types and have a work-around with array comprehensions, it's a touch awkward and I do think that it makes sense for the geodetic_geocentric to be consistent with return types eventually -- some already return SVectors and other Tuples -- so it works for you I'm going to submit an issue to deal with it later, but its not blocking at the moment.

@ronisbr
Copy link
Member

ronisbr commented Oct 19, 2024

Hi @jmurphy6895 !

Excellent! The design we selected was to use SVector only if the return type is actually a vector. If you are returning a set of information (like latitude, longitude and altitude), then we used tuples.

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7159cb5) to head (c1b4666).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #7   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        29    -1     
  Lines         1164      1170    +6     
=========================================
+ Hits          1164      1170    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ronisbr ronisbr merged commit 2bcb3ce into JuliaSpace:main Nov 15, 2024
9 of 12 checks passed
@ronisbr
Copy link
Member

ronisbr commented Nov 15, 2024

Thanks @jmurphy6895 !

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