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

Replace closures with argument shuffling in second order #572

Merged
merged 3 commits into from
Oct 11, 2024
Merged

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Oct 11, 2024

Versions

DI source

  • In second_derivative and hvp, remove inner_derivative/gradient/pushforward and replace them with shuffled versions that use additional contexts to pass f and backend.
  • Remove the private DI.nested

DI extensions

  • Zygote, Tracker: Move to a closure-based handling of constants? The idea is to avoid computing pullbacks of function and backend objects if possible.
  • Symbolics: Code manual second_derivative and hvp because passing constants is not supported.

@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.52%. Comparing base (10d63da) to head (d8beacd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #572      +/-   ##
==========================================
+ Coverage   97.51%   97.52%   +0.01%     
==========================================
  Files         108      108              
  Lines        4903     4968      +65     
==========================================
+ Hits         4781     4845      +64     
- Misses        122      123       +1     
Flag Coverage Δ
DI 98.68% <100.00%> (-0.01%) ⬇️
DIT 95.15% <ø> (ø)

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.

@gdalle gdalle linked an issue Oct 11, 2024 that may be closed by this pull request
@gdalle gdalle merged commit 17863c6 into main Oct 11, 2024
43 checks passed
@gdalle gdalle deleted the gd/noclosures branch October 11, 2024 13:50
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.

Closure created for hvp
2 participants