L i dZddlmZgdZddlZddlmZerddlmZGdde Z Gd d e Z Gd d e Z Gd de Zy)zONNX exporter exceptions.) annotations)OnnxExporterWarningSymbolicValueErrorUnsupportedOperatorErrorN) TYPE_CHECKING)_CceZdZdZy)rzWarnings in the ONNX exporter.N__name__ __module__ __qualname____doc__W/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/torch/onnx/errors.pyrrs(rrceZdZdZy)OnnxExporterErrorzSErrors raised by the ONNX exporter. This is the base class for all exporter errors.Nr rrrrrs]rrc$eZdZdZdfd ZxZS)rz7Raised when an operator is unsupported by the exporter.c|| d|d|d|d}n|jdr d|d|d}nd}t| |y)NzExporting the operator 'z' to ONNX opset version zB is not supported. Support for this operator was added in version z!, try exporting with this version)zaten::zprim::z quantized::z is not supportedzONNX export failed on an operator with unrecognized namespace {op_name}. If you are trying to export a custom operator, make sure you registered it with the right domain and version.) startswithsuper__init__)selfnameversionsupported_versionmsg __class__s rrz!UnsupportedOperatorError.__init__!sx  (*4&0H RT$%%FH  __@ A*4&0H R##  0  r)rstrrintrz int | Noner r r rr __classcell__rs@rrrsArrc$eZdZdZdfd ZxZS)rz+Errors around TorchScript values and nodes.c `|d|d|jd|jjd}|jj}|r |d|dz } |dz }|t j dd j d t|jjDxsd zd zd zd j d t|jjDxsd zdz }t|1|y#t$r|dz }Y wxYw)Nz [Caused by the value 'z ' (type 'z;') in the TorchScript graph. The containing node has kind 'z'.] z (node defined in )z zInputs:  c3VK|]!\}}d|d|d|jd#ywz #z: z (type 'z')Ntype).0iinput_s r z.SymbolicValueError.__init__..M7" )6$A3b &++-K"')z Emptyz Outputs: c3VK|]!\}}d|d|d|jd#ywr)r*)r,r-outputs rr/z.SymbolicValueError.__init__..Vr0r1z zv Failed to obtain its input and output for debugging. Please refer to the TorchScript graph for debugging information.) r+nodekind sourceRangetextwrapindentjoin enumerateinputsoutputsAttributeErrorrr)rrvaluemessage code_locationrs rrzSymbolicValueError.__init__<s\e+E7)EJJL>J@@E @Q@Q@S?TTX Z   002  0qA AG  v G x "-6uzz|7J7J7L-M"'' # # "-6uzz|7K7K7M-N"''$) G8 !   S G s$B(DD-,D-)rrr>z_C.Valuer!r#s@rrr7s5)")"rr)r __future__r__all__r7typingrtorchr UserWarningr RuntimeErrorrrrrrrrGsV"   )+)^ ^06."*."r