You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A BOGO special on the bugs uncovered by unit test refactors (I stumbled onto this when working through some problems related to #366 ). When reparameterizing a model using set_all_parameterizations this change in parameterization doesn't propagate to the default_param attribute of the model's various contained OrderedMemberDict objects (i.e. the values of model.preps, model.operations etc.). This attribute controls the casting behavior that is invoked when directly setting the value of an entry in an OrderedMemberDict when setting this value to a numpy array. E.g. if the value of default_param for this OrderedMemberDict is 'full TP' then directly setting the value of model.operations with an array will cast this array to a FullTPOp.
This feels like unexpected behavior to me, and I'd expect this change in parameterizations to propagate through but I'd be interested in hearing if the other devs have thoughts on this (e.g. are there any places where I might break things by changing this behavior).
Environment (please complete the following information):
pyGSTi version: develop
python version 3.9
OS Windows 11
The text was updated successfully, but these errors were encountered:
A BOGO special on the bugs uncovered by unit test refactors (I stumbled onto this when working through some problems related to #366 ). When reparameterizing a model using
set_all_parameterizations
this change in parameterization doesn't propagate to thedefault_param
attribute of the model's various contained OrderedMemberDict objects (i.e. the values of model.preps, model.operations etc.). This attribute controls the casting behavior that is invoked when directly setting the value of an entry in an OrderedMemberDict when setting this value to a numpy array. E.g. if the value ofdefault_param
for this OrderedMemberDict is 'full TP' then directly setting the value of model.operations with an array will cast this array to a FullTPOp.Here is a minimal working demonstration.
The above prints 'full TP' both times.
This feels like unexpected behavior to me, and I'd expect this change in parameterizations to propagate through but I'd be interested in hearing if the other devs have thoughts on this (e.g. are there any places where I might break things by changing this behavior).
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: