Closed KristofferC closed 3 years ago
We need it in the symbolic stack because identity
seems to show up from random things like linear algebra, so I think ForwardDiff.jl needs it too. It would need a lot of downstream tests to remove IMO given how many weird places we've seen this crop up. I would be scared of deleting it, even though it does cause invalidations.
Ok, we should add some test then. I don't see how the default fallback for identity
doesn't work for ForwardDiff or the symbolic stack. Do you have an example?
Oh I see what you're saying.
idenity(f::Dual) = Dual(identity(f.val), identity(f.val) * f.der) == Dual(identity(f.val), identity(f.val)) == identity(f::Any)
For some reason I was thinking the derivative of the identity is 1, so identity(Dual(2,2)) == Dual(2,1)
... but no you're right. The standard identity
dispatch is fine, so ForwardDiff shouldn't be defining a Dual method on this.
Nabla failures unrelated @oxinabox ?
Nabla failures unrelated. Latest version of Nabla shouldn't even use DiffRules anymore.
I agree this is safe to remove. It is technically breaking. But it has only been there a month, and Symbolics.jl is the only thing doing anything new in that period that I am aware of. So if it doesn't hurt Symbolics then it is all good.
If it hurts Symbolics then we'll find out quickly so it's good. Rip off the bandaid.
This one causes quite a lot of invalidations (https://github.com/SciML/DiffEqBase.jl/pull/698#issuecomment-896872594). It was added in https://github.com/JuliaDiff/DiffRules.jl/pull/54 but it is unclear why it was added.
Is it needed for anything?