@@ -1101,19 +1101,16 @@ def check(self, node: gs.Node) -> bool:
11011101 valid = True
11021102
11031103 if not self .inputDescriptor .checkTensors (node .inputs ):
1104- # TODO: Change to logging
1105- print (f"[ERROR OP { node .op } ] Invalid input tensors: { [t .name for t in node .inputs ]} " )
1104+ log .error (f"[OP { node .op } ] Invalid input tensors: { [t .name for t in node .inputs ]} " )
11061105 valid = False
11071106
11081107 if not self .outputDescriptor .checkTensors (node .outputs ):
1109- # TODO: Change to logging
1110- print (f"[ERROR OP { node .op } ] Invalid output tensors: { [t .name for t in node .outputs ]} " )
1108+ log .error (f"[OP { node .op } ] Invalid output tensors: { [t .name for t in node .outputs ]} " )
11111109 valid = False
11121110
11131111 for attrDesc in self .attrDescriptors :
11141112 if attrDesc .default is None and not attrDesc .name in node .attrs :
1115- # TODO: Change to logging
1116- print (f"[ERROR OP { node .op } ] Missing attribute { attrDesc .name } " )
1113+ log .error (f"[OP { node .op } ] Missing attribute { attrDesc .name } " )
11171114 valid = False
11181115
11191116 return valid
@@ -1128,7 +1125,7 @@ def canonicalize(self, node: gs.Node, opset: int) -> bool:
11281125 try :
11291126 node .attrs [desc .name ] = desc .unpack (value )
11301127 except Exception as e :
1131- raise ValueError (f"[ERROR OP { node .op } ] Error unpacking the attribute { desc .name } . { e } " ) from e
1128+ raise ValueError (f"[OP { node .op } ] Error unpacking the attribute { desc .name } . { e } " ) from e
11321129 return True
11331130
11341131 def parseTensors (self , ctxt : NetworkContext , tensors : Sequence [gs .Tensor ],
@@ -1158,7 +1155,7 @@ def parse(self, ctxt: NetworkContext, node: gs.Node) -> OperatorRepresentation:
11581155 firstKeySet = set (firstOpRepr .keys ())
11591156 secondKeySet = set (secondOpRepr .keys ())
11601157 assert firstKeySet .isdisjoint (secondKeySet ), \
1161- f"[PARSE ERROR] (Node: { node .name } , Op: { node .op } ) " \
1158+ f"[OP { node .op } ] Encourntered error while parsing node { node .name } . " \
11621159 f"Keys from parsing { firstName } clash with the keys from parsing { secondName } . " \
11631160 f"Overlapping keys: { firstKeySet ^ secondKeySet } "
11641161
0 commit comments