tpapp / LogDensityProblemsAD.jl

AD backends for LogDensityProblems.jl.
MIT License
12 stars 6 forks source link

Add error hints #42

Open devmotion opened 7 hours ago

devmotion commented 7 hours ago

The PR adds an error hint that tells users that maybe they forgot to load DifferentiationInterface in case ADgradient(::AbstractADType, ...) is not defined.

IMO manually throwing MethodErrors is a bit questionable, therefore I also replaced the existing notification for undefined ADgradient(::Val, ...) to an error hint.

Fixes #41.