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
Main branch, latest commit (279f9c3). Freshly setup venv with onnx, qonnx and dependencies.
Quick summary
Setting a node attribute with the wrong type causes bad behaviour.
Details
When setting a node attribute in a CustomOp instance using set_nodeattr to the wrong type of value, and consequently requesting it using get_nodeattr this yields the wrong value. I encountered this behaviour for an int-attribute that I accidentally assigned a float to, but also tested it using a string-attribute that I tried assigning an int to.
The first value being the correct default, the second value appearing after using the wrong type to set the attribute and the third value after inserting a value of the correct type.
Fix
When setting an attribute to a value of the wrong type I would either propose raising an exception, ignoring the assignment, throwing a warning or trying to cast the value. Currently the operation happens quietly, and when retrieving a wrong value is found.
The text was updated successfully, but these errors were encountered:
Prerequisites
Main branch, latest commit (279f9c3). Freshly setup venv with onnx, qonnx and dependencies.
Quick summary
Setting a node attribute with the wrong type causes bad behaviour.
Details
When setting a node attribute in a
CustomOp
instance usingset_nodeattr
to the wrong type of value, and consequently requesting it usingget_nodeattr
this yields the wrong value. I encountered this behaviour for an int-attribute that I accidentally assigned a float to, but also tested it using a string-attribute that I tried assigning an int to.Steps to Reproduce
This would print
The first value being the correct default, the second value appearing after using the wrong type to set the attribute and the third value after inserting a value of the correct type.
Fix
When setting an attribute to a value of the wrong type I would either propose raising an exception, ignoring the assignment, throwing a warning or trying to cast the value. Currently the operation happens quietly, and when retrieving a wrong value is found.
The text was updated successfully, but these errors were encountered: