Open Jollywatt opened 3 years ago
People outside Invenia are using Nabla? I don't really recommend it for new projects, we are hoping to deprecate Nabla at some point, once we migrate the last internal projects off it.
What is going wrong is that Nabla is generating a overload based on the ChainRule for getindex.
Now it has a check in-place to make sure it never generates a rule that doesn't have at least 1 argument of Node
type.
https://github.com/invenia/Nabla.jl/blob/f5adedb5632d0ec9b887709e0c0391286d386603/src/sensitivities/chainrules.jl#L188
But it gets tricked by the vararg. Because it generates:
getindex(::Array, ::Node...)
Which looks fine because one argument is a Node
.
But it isn't since as a vararg, there might be zero of these actually present.
So somehow we need to introduce special handling for varargs to make sure at least one is present if we are requiring that for purposes of making sure we only generare methods were we have changes at least one type to Node
.
People outside Invenia are using Nabla?
I don't really recommend it for new projects, we are hoping to deprecate Nabla at some point, once we migrate the last internal projects off it.
BTW, I'm new to AD and didn't know which to chose from the plethora of Julia AD packages — but I get the impression that Zygote.jl is the best for high-level use.
Welcome. Yes, Zygote is a good place to start. I also comaintain Zygote, and it is what Invenia uses for most new projects
For example:
Tested on: