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

Add overloaded_inputs for preparations #672

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ErikQQY
Copy link
Contributor

@ErikQQY ErikQQY commented Jan 6, 2025

Fix: #668

This PR only adds the overloaded_inputs functionalities for Jacobian preparations, not sure if the derivative, gradient and hessian preparation need this API.

The tests for this feature maybe too simple, need some suggestions for better test cases.

@ErikQQY ErikQQY requested a review from gdalle as a code owner January 6, 2025 15:24
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.61%. Comparing base (6604be2) to head (ebc6022).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #672   +/-   ##
=======================================
  Coverage   97.61%   97.61%           
=======================================
  Files         112      114    +2     
  Lines        5609     5619   +10     
=======================================
+ Hits         5475     5485   +10     
  Misses        134      134           
Flag Coverage Δ
DI 98.76% <100.00%> (+<0.01%) ⬆️
DIT 95.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ErikQQY
Copy link
Contributor Author

ErikQQY commented Jan 6, 2025

CI failures seem not related.

@gdalle
Copy link
Member

gdalle commented Jan 6, 2025

Thanks for getting this started! In terms of design, I think we should not just return an eltype but instead we should return the full dualized array. The reason being that some backends (like Mooncake) don't take an elementwise dual.
Could you also make sure that code coverage does not decrease?

@ErikQQY
Copy link
Contributor Author

ErikQQY commented Jan 7, 2025

All tests passed now.

@ErikQQY
Copy link
Contributor Author

ErikQQY commented Jan 7, 2025

Also implemented the overloaded_inputs for derivative and gradient preparations.

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.

Add API for overloaded inputs
2 participants