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

Change default derivative impl to reverse mode #170

Merged
merged 25 commits into from
Aug 13, 2024
Merged

Conversation

sritchie
Copy link
Member

@sritchie sritchie commented Apr 24, 2024

  • Change default derivative impl to reverse mode #170:

    • changes D and partial to use reverse mode automatic differentiation by
      default, and fixes all associated tests

    • adds emmy.generic/{zero?,one?,identity?} implementations (all false) to
      emmy.tape/Completed, in case some collection type tries to simplify these
      during reverse-mode AD

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 87.40%. Comparing base (622ba21) to head (9ad363b).

Files Patch % Lines
src/emmy/dual.cljc 33.33% 0 Missing and 2 partials ⚠️
src/emmy/calculus/derivative.cljc 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #170      +/-   ##
==========================================
- Coverage   87.67%   87.40%   -0.28%     
==========================================
  Files         100      100              
  Lines       15811    15812       +1     
  Branches      853      851       -2     
==========================================
- Hits        13862    13820      -42     
- Misses       1096     1141      +45     
+ Partials      853      851       -2     

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

@sritchie sritchie changed the base branch from sritchie/proto to main August 13, 2024 13:59
@sritchie sritchie marked this pull request as ready for review August 13, 2024 15:07
(throw
(ex-info "Legendre Transform Failure: determinant = 0"
{:F F :w w})))
(throw
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed extra println

J-func
(Phi* ((D C) s))))
(s/compatible-shape s))))
(let [s-syms (s/compatible-shape s)]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this forces compatible-shape to evaluate and make its gensym calls before the ((D C) s) calls, important for repeatable tests

@sritchie sritchie merged commit cac1791 into main Aug 13, 2024
4 checks passed
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.

1 participant