-
-
Notifications
You must be signed in to change notification settings - Fork 105
Fix type instability #989
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
Fix type instability #989
Conversation
It seems #985 is also fixed after this. |
@@ -229,7 +229,7 @@ function remake(prob::ODEProblem; f = missing, | |||
|
|||
iip = isinplace(prob) | |||
|
|||
if build_initializeprob == Val{true} || build_initializeprob == true | |||
if build_initializeprob isa Val{true} || build_initializeprob == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build_initializeprob
defaults to Val{true}
and Val{true} isa Val{true} == false
so this won't run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right ... 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other way to do it is build_initializeprob === Val{true}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't help. Looks like the problem is inside the if
, within remake_initialization_data::Any
. I effectively just made it if false
so it never ran.
I think SciML/ModelingToolkit.jl#3560 is really just a rediscovery of #985. Sorry for wasting your time, I thought I had narrowed this down to something simple ... |
See SciML/ModelingToolkit.jl#3560.