JuliaDiff / TaylorDiff.jl

Taylor-mode automatic differentiation for higher-order derivatives
https://juliadiff.org/TaylorDiff.jl/
MIT License
73 stars 8 forks source link

Using ZygoteRules.jl instead of Zygote.jl? #12

Closed longemen3000 closed 1 year ago

longemen3000 commented 1 year ago

Hi, First of all, Excelent package! Looking forward to test it.

I was looking at the code, and I saw the zygote dependency, and that dependency is only used for the @adjoint macro. That macro is actually reexported from https://github.com/FluxML/ZygoteRules.jl , so loading the complete Zygote package does not seem necessary in this case?

tansongchen commented 1 year ago

Hi Andrés,

Thank you for your interest in this package! I've already submitted the request to Julia registry, once they approved you can install this package in a standard way. Feedbacks and potential use cases are appreciated.

You are absolutely right that the Zygote dependency is only used for defining rules, which made this line of code (Zygote over TaylorDiff) works. I will remove Zygote as a dependency.

I took a look at Zygote's documentation and it seems that adding rules to ChainRulesCore.jl is more preferred than @adjoint, so I will probably rewrite those @adjoints by rrule.

tansongchen commented 1 year ago

Fixed at #13.