-
Notifications
You must be signed in to change notification settings - Fork 24
StackOverflow Issue on Certain Functions #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, thanks for reporting this! Can you provide a self-sufficient runnable example, including the definition of what seem to be global variables in your code ( |
Yeah, sorry about that here is a simpler self-contained version
|
Okay I know what's happening, your function is piecewise constant and its output is not created from its input, so ForwardDiff doesn't get a |
Can you try installing DI from the branch in the PR #526 to see if it solves your issue? |
No more StackOverflow, but there a new error message
|
How about now? |
Yeah, it's working! Thanks so much for the quick help! |
I opened #527 to keep track of the tests I need to add, but I'll release the fix before that |
Uh oh!
There was an error while loading. Please reload this page.
I'm adding some tests to some packages using DifferentiationInterface to make sure everything is differentiable and I'm occasionally running into a weird bug where I get a StackOverflow error
Here's a simple MWE where I run into it.
When trying to differentiate through this function --> the derivative is 0.0 everywhere
I get a StackOverflow error when running this code (only on ForwardDiff not FiniteDiff):
But have no problem when running
ForwardDiff.derivative(get_Δat, jd_utc)
Do you have any idea of what might be happening? I copied the function I'm working with because it's short but to get the pure function you can add
using SatelliteToolboxTransformations
.Pkg Status for completeness -- Julia v"1.10.0"
Project SatelliteToolboxTransformations v0.1.8
Status
C:\Users\jmurp\.julia\dev\SatelliteToolboxTransformations\Project.toml
[a8cc5b0e] Crayons v4.1.1
[8bb1440f] DelimitedFiles v1.9.1
[a0c0ee7d] DifferentiationInterface v0.6.1
[6a86dc24] FiniteDiff v2.24.0
[f6369f11] ForwardDiff v0.10.36
[a98d9a8b] Interpolations v0.15.1
[189a3867] Reexport v1.2.2
[74f56ac7] ReferenceFrameRotations v3.0.2
[9e17983a] SatelliteToolboxBase v0.3.2
[6c6a2e73] Scratch v1.2.1
[90137ffa] StaticArrays v1.9.7
[ade2ca70] Dates
[f43a241f] Downloads v1.6.0
[37e2e46d] LinearAlgebra
The text was updated successfully, but these errors were encountered: