which apparently tries to call it with a
Compositeinput.
This is the automatic tangent generation kicking in.
You can teach ChainRulesTestUtils what the tangent type for your type is, by overloading ChainRulesTestUtils.rand_tangent(::AbstractRNG, ::Point)
Or you can pass in the tangent manually by using the output_tangent=... keyword argument.
You just need to make that return a valid differential for your type.
Basically a vector fieldish type that overload +, and zero, and scalar multiplication.
you can read more about differential types here and here, though i don’t think either part of our docs on them are fantastic.
Composite is the generic differnetial that is valid for all structs.
The easiest solution here would be to just overload
random_tangentforPoint, but perhaps the default should be changed?
What other default is possible for a struct we know nothing about?
I guess in this case we know it is a subtype of AbstractArray.
maybe we should have a default for that which is an Array?
That kind of thing has landed us in trouble before for structed sparse arrays like Diagonal.
but it might cause less trouble than erroring, i doubt the error in this case is very clear