mentat-collective / emmy

The Emmy Computer Algebra System.
https://emmy.mentat.org
GNU General Public License v3.0
405 stars 24 forks source link

Support all output types in reverse-mode #169

Closed sritchie closed 3 months ago

sritchie commented 7 months ago

This PR:

We need these two passes because:

  1. for structural outputs, we need to do a reverse-mode pass for each entry in the output. This creates a structure of Completed maps of node => sensitivity.
  2. then, for each entry in a structural INPUT, we need to replace that entry with a copy of this output with that input's ID selected out
codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 86.86869% with 52 lines in your changes are missing coverage. Please review.

Project coverage is 87.57%. Comparing base (f3ac544) to head (c14793b).

Files Patch % Lines
src/emmy/calculus/derivative.cljc 69.38% 11 Missing and 4 partials :warning:
src/emmy/collection.cljc 7.69% 5 Missing and 7 partials :warning:
src/emmy/autodiff.cljc 94.92% 5 Missing and 5 partials :warning:
src/emmy/quaternion.cljc 60.00% 4 Missing :warning:
src/emmy/dual.cljc 87.50% 2 Missing and 1 partial :warning:
src/emmy/function.cljc 93.54% 2 Missing :warning:
src/emmy/series.cljc 94.28% 2 Missing :warning:
src/emmy/tape.cljc 90.90% 1 Missing and 1 partial :warning:
src/emmy/matrix.cljc 50.00% 1 Missing :warning:
src/emmy/polynomial.cljc 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #169 +/- ## ========================================== - Coverage 87.68% 87.57% -0.12% ========================================== Files 99 100 +1 Lines 15792 15796 +4 Branches 850 850 ========================================== - Hits 13847 13833 -14 - Misses 1095 1113 +18 Partials 850 850 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sritchie commented 7 months ago

Qs for @littleredcomputer:

Looking forward to your feedback here...

sritchie commented 3 months ago

Superceded by #179, #182, #183, #185