Conversation
Add a scipy version restriction after encountering terrible errors in a plato build. The culprit was a method call somewhere in ```Objective.py``` with an error similar to ```terminate called after throwing an instance of 'pybind11::error_already_set' what(): TypeError: primal and tangent arguments to jax.jvp do not match; dtypes must be equal, or in case of int/bool primal dtype the tangent dtype must be float0.Got primal dtype float64 and so expected tangent dtype float64, but got tangent dtype int8 instead. __notes__ (len=1):```
tupek2
left a comment
There was a problem hiding this comment.
Interesting. I had this error. I can fix it with this change on line~17 in WarmStart.py:
op = lambda v: objective.hessian_vec(x, np.array(v, dtype=np.float64))
This let me upgrade to newer jax versions. Apparently scipy these days will pass integer vectors to iterative solvers sometimes?
fixing to an upper bound since 1.14.1 doesn't exist for python 3.9
Sounds good to me Mike. Glad you dug a little deeper than I did. I was happy just to get things working again. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #105 +/- ##
=======================================
Coverage 77.18% 77.18%
=======================================
Files 62 62
Lines 5225 5225
=======================================
Hits 4033 4033
Misses 1192 1192 ☔ View full report in Codecov by Sentry. |
|
@ralberd , hod on, don't merge - Mike has a more fundamental fix. See comments above. |
I'm adding Mike's fix @btalamini |
|
Yeah, my suggested fix is in there. Hopefully that addresses it, but its sort of odd still. |
|
Now something is up with metis... |
|
In light of the issues Craig is running into, I'm going to open a separate MR that just fixes the scipy version to 1.14.1 since that works. We can keep this one open to keep working on a better fix. |
Add a scipy version restriction after encountering terrible errors in a plato build.
The culprit was a method call somewhere in
Objective.pywith an error similar toThis error was encountered on scipy 1.15.0 and no issues were encountered on 1.14.1. Something in scipy changed that jax is not tracing properly.