sparseml.onnx.framework package

Submodules

sparseml.onnx.framework.info module

Functionality related to detecting and getting information for support and sparsification in the ONNX/ONNXRuntime framework.

sparseml.onnx.framework.info.detect_framework(item: Any)sparseml.base.Framework[source]

Detect the supported ML framework for a given item specifically for the onnx/onnxruntime package. Supported input types are the following: - A Framework enum - A string of any case representing the name of the framework

(deepsparse, onnx, keras, pytorch, tensorflow_v1)

  • A supported file type within the framework such as model files: (onnx, pth, h5, pb)

  • An object from a supported ML framework such as a model instance

If the framework cannot be determined, will return Framework.unknown

Parameters

item (Any) – The item to detect the ML framework for

Returns

The detected framework from the given item

Return type

Framework

sparseml.onnx.framework.info.framework_info()sparseml.framework.info.FrameworkInfo[source]

Detect the information for the onnx/onnxruntime framework such as package versions, availability for core actions such as training and inference, sparsification support, and inference provider support.

Returns

The framework info for onnx/onnxruntime

Return type

FrameworkInfo

sparseml.onnx.framework.info.is_supported(item: Any)bool[source]
Parameters

item (Any) – The item to detect the support for

Returns

True if the item is supported by onnx/onnxruntime, False otherwise

Return type

bool

Module contents

Functionality related to integrating with, detecting, and getting information for support and sparsification in the ONNX/ONNXRuntime framework.