Skip to content

Commit

Permalink
Update _core.py
Browse files Browse the repository at this point in the history
Patch for Big Brother issue!  
microsoft#1984
  • Loading branch information
leshabirukov authored Dec 30, 2024
1 parent 3c75013 commit a6d734f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions onnxscript/ir/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,10 @@ def __init__(
# very often. This way all mutations can be tracked.
# If necessary, we can cache the inputs and outputs as tuples.
self._inputs: tuple[Value | None, ...] = tuple(inputs)
if self._inputs and self._inputs[-1] and not isinstance(self._inputs[-1], (Value)):
raise TypeError(
f"{self.op_type} got unexpected positional argument, may be missed keyword"
)
# Values belong to their defining nodes. The values list is immutable
self._outputs: tuple[Value, ...] = self._create_outputs(num_outputs, outputs)
attributes = tuple(attributes)
Expand Down

0 comments on commit a6d734f

Please sign in to comment.