JuliaDiff / AbstractDifferentiation.jl

An abstract interface for automatic differentiation.
https://juliadiff.org/AbstractDifferentiation.jl/
MIT License
135 stars 18 forks source link

Remove the jacobian and primal_value primitives #95

Closed devmotion closed 12 months ago

devmotion commented 1 year ago

The jacobian and the primal_value support for @primitive does not provide any benefit but IMO rather makes the code less readable (related also to https://github.com/JuliaDiff/AbstractDifferentiation.jl/issues/91): The macro version is equivalent to directly defining AD.jacobian or AD.primal_value.

Hence this PR proposes to remove support for @primitive function jacobian and @primitive function primal_value (which seems unused and untested).

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.74% :tada:

Comparison is base (041d760) 84.25% compared to head (2b321b0) 85.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #95 +/- ## ========================================== + Coverage 84.25% 85.00% +0.74% ========================================== Files 8 8 Lines 470 460 -10 ========================================== - Hits 396 391 -5 + Misses 74 69 -5 ``` | [Files Changed](https://app.codecov.io/gh/JuliaDiff/AbstractDifferentiation.jl/pull/95?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff) | Coverage Δ | | |---|---|---| | [src/AbstractDifferentiation.jl](https://app.codecov.io/gh/JuliaDiff/AbstractDifferentiation.jl/pull/95?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL0Fic3RyYWN0RGlmZmVyZW50aWF0aW9uLmps) | `80.51% <ø> (+0.85%)` | :arrow_up: | | [ext/AbstractDifferentiationFiniteDifferencesExt.jl](https://app.codecov.io/gh/JuliaDiff/AbstractDifferentiation.jl/pull/95?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-ZXh0L0Fic3RyYWN0RGlmZmVyZW50aWF0aW9uRmluaXRlRGlmZmVyZW5jZXNFeHQuamw=) | `100.00% <100.00%> (ø)` | | | [ext/AbstractDifferentiationReverseDiffExt.jl](https://app.codecov.io/gh/JuliaDiff/AbstractDifferentiation.jl/pull/95?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-ZXh0L0Fic3RyYWN0RGlmZmVyZW50aWF0aW9uUmV2ZXJzZURpZmZFeHQuamw=) | `100.00% <100.00%> (ø)` | |

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

oxinabox commented 1 year ago

we should do this. I guess it is technically breaking but since noone is using them, probably fine

gdalle commented 12 months ago

PR #93 is also breaking, and I'd like to break more stuff by tackling #53, so who cares? We can just tag 0.6 once we've done all that

mohamed82008 commented 12 months ago

I am in favour of breaking changes in this package and tagging a new release. I apologise for not being too actively involved here. Please tag team on this package without me and freely merge PRs if you all agree on the changes. I don't want to get in the way of progress here. Good luck!

devmotion commented 12 months ago

Could someone officially approve the PR? 🙂

devmotion commented 11 months ago

Thank you @mohamed82008! Makes me wonder though if we should adopt the colprac guidelines if more people are maintaining the package now (so far my impression was that basically everything should be approved by you 🙂)?

mohamed82008 commented 11 months ago

As the initiator of this package, I played the role of its maintainer for a while and then I got busy with other stuff and the package was not actively maintained. I think this package should be community-maintained since there seems to be enough interest and no time on my part to be the maintainer. I am not familiar with colprac guidelines for multiple maintainers. But I would say as long as 1 qualified reviewer approves the PR and no one objects in a certain time window, it can be safely merged. Happy to adopt any other standard folks are used to though.