Closed 1ozturkbe closed 4 years ago
Solve fails, tries to run debug and errors. Will investigate.
Really weird behavior, but if I take the model in SPaircraft, and instead of calling .localsolve I call .debug, it replaces a particular substitution with nan.
In [26]: m.substitutions['M_{4a}']
Out[26]:
array([[ nan],
[0.1025],
[0.1025],
[0.1025],
[0.1025]], dtype=float32)
No idea why...
huh. have you tried going step-by-step through the debug method to see what line this happens in? Maybe this is a bug in RelaxConstants?
On Mon, Apr 20, 2020 at 8:32 AM Berk Ozturk notifications@github.com wrote:
Really weird behavior, but if I take the model in SPaircraft, and instead of calling .localsolve I call .debug, it replaces a particular substitution with nan.
In [26]: m.substitutions['M_{4a}'] Out[26]: array([[ nan], [0.1025], [0.1025], [0.1025], [0.1025]], dtype=float32)
No idea why...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/convexengineering/gpkit/issues/1485#issuecomment-616630078, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALKAGEDGR7GHLOFXNZAHNTRNRTIVANCNFSM4MMQZ2SQ .
I'm going to do it today, just had other fish to fry for a little.
Issue is in varkeys for VectorVariables. Eg. In ConstantsRelaxed, constants.keys() has VectorVariable[i=1,...,k] as VarKeys, whereas the substitutions have VectorVariable[:] only. Since the keys don't match, any model with VectorVariables does not support debug at all right now.
A little shocked that we didn't have a test for this. Perhaps adding some debugs to gpkit example tests would resolve this.
The nans however are more odd. It seems like, when a substitutions are passed for only some elements of a VectorVariable, the dict is filled with nans for the non-substituted indices.
that is expected behaviour: we use nan to flag non-substituted variables.
On Thu, Apr 23, 2020 at 9:00 AM Berk Ozturk notifications@github.com wrote:
The nans however are more odd. It seems like, when a substitutions are passed for only some elements of a VectorVariable, the dict is filled with nans for the non-substituted indices.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/convexengineering/gpkit/issues/1485#issuecomment-618484428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALKAGGNYJDR6I57V2QFY7DROBQYVANCNFSM4MMQZ2SQ .
related to #1488, I think
Here is the error message I get when running SPaircraft/killer_plots.py.