§
    ÒwŠi:  ã                  óF   — d dl mZ d dlZd dlmc mZ 	 ddd	„Z	 	 ddd„ZdS )é    )ÚannotationsNFÚmodelúonnx.ModelProtoÚconvert_versionÚboolÚreturnc                ó¤   — t          j        |                      ¦   «         |¦  «        }t          j        ¦   «         }|                     |¦  «         |S )ab  Inline model-local functions in given model.

    Arguments:
        model: an ONNX ModelProto
        convert_version: if true, try to apply automatic version-conversion to functions requiring a
            different (ONNX) opset version from the model.

    Returns:
        ModelProto with all calls to model-local functions inlined (recursively)
    )ÚCÚinline_local_functionsÚSerializeToStringÚonnxÚ
ModelProtoÚParseFromString)r   r   ÚresultÚinlined_models       ú\/root/.openclaw/workspace/chatterbox_venv_py311/lib/python3.11/site-packages/onnx/inliner.pyr   r      sI   € õ Ô% e×&=Ò&=Ñ&?Ô&?ÀÑQÔQ€FÝ”OÑ%Ô%€MØ×!Ò! &Ñ)Ô)Ð)ØÐó    Úfunction_idsúlist[tuple[str, str]]ÚexcludeÚinline_schema_functionsc                óü   — |r)t          j        |                      ¦   «         ||¦  «        }n(t          j        |                      ¦   «         ||¦  «        }t	          j        ¦   «         }|                     |¦  «         |S )aœ  Inline selected functions in given model.

    Arguments:
        model: an ONNX ModelProto
        function_ids: list of functions to include/exclude when inlining. Each
            element is a tuple of (function domain, function name).
        exclude: if true, inlines all functions except those specified in function_ids.
           if false, inlines all functions specified in function_ids.
        inline_schema_functions: if true, inlines schema-defined functions as well
            as model-local functions. Otherwise, only model-local functions are inlined.

    Returns:
        ModelProto with all calls to model-local functions inlined (recursively)
    )r
   Úinline_selected_functions2r   Úinline_selected_functionsr   r   r   )r   r   r   r   r   r   s         r   r   r      sƒ   € ð( ð 
ÝÔ-Ø×#Ò#Ñ%Ô% |°Wñ
ô 
ˆˆõ Ô,Ø×#Ò#Ñ%Ô% |°Wñ
ô 
ˆõ ”OÑ%Ô%€MØ×!Ò! &Ñ)Ô)Ð)ØÐr   )F)r   r   r   r   r   r   )FF)
r   r   r   r   r   r   r   r   r   r   )	Ú
__future__r   r   Úonnx.onnx_cpp2py_export.inlinerÚonnx_cpp2py_exportÚinlinerr
   r   r   © r   r   ú<module>r       s†   ðð
 #Ð "Ð "Ð "Ð "Ð "à €€€Ø +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ð +ð 5:ðð ð ð ð ð, Ø$)ð	ð ð ð ð ð ð r   