yobx.container.export_artifact#

ExportArtifact and ExportReport — standard output of every to_onnx() conversion function.

class yobx.container.export_artifact.FunctionPieces(initializers_name: List[str] | None = None, initializers_dict: Dict[str, Any] | None = None, initializers_renaming: Dict[str, str] | None = None, nested_functions: List[FunctionProto] | None = None, nested_function_names: Set[Tuple[str, str]] | None = None)[source]#

Holds the function-specific data produced by _to_onnx_function().

An instance of this class is stored as ExportArtifact.function when to_onnx() is called with function_options.export_as_function=True. It is None for regular model exports.

Parameters:
  • initializers_name – list[str] | None Ordered list of extra input names that were promoted from initializers into function inputs when return_initializer=True was set in FunctionOptions. None when no initializers were promoted.

  • initializers_dict – dict[str, Any] | None Mapping from (possibly renamed) initializer name to tensor value for every name listed in initializers_name. None when no initializers were promoted.

  • initializers_renaming – dict[str, str] | None Mapping from original initializer name to the (possibly renamed) name used in initializers_name. None when no initializers were promoted.

  • nested_functions – list[FunctionProto] | None Local FunctionProto objects defined inside the exported function that are needed to evaluate it. None when there are no nested functions.

  • nested_function_names – set of (domain, name) used by the GraphBuilder owning the functions