[docs]classCheckerPass(ir.passes.PassBase):"""Run onnx checker on the model."""@propertydefin_place(self)->Literal[True]:"""This pass does not create a new model."""returnTrue@propertydefchanges_input(self)->Literal[False]:"""This pass does not change the input model."""returnFalsedef__init__(self,full_check:bool=False,skip_opset_compatibility_check:bool=False,check_custom_domain:bool=False,):super().__init__()self.full_check=full_checkself.skip_opset_compatibility_check=skip_opset_compatibility_checkself.check_custom_domain=check_custom_domaindefcall(self,model:ir.Model)->ir.passes.PassResult:"""Run the onnx checker on the model."""def_partial_check_model(proto:onnx.ModelProto)->None:"""Partial function to check the model."""onnx.checker.check_model(proto,full_check=self.full_check,skip_opset_compatibility_check=self.skip_opset_compatibility_check,check_custom_domain=self.check_custom_domain,)_c_api_utils.call_onnx_api(func=_partial_check_model,model=model)# The model is not modifiedreturnir.passes.PassResult(model,False)