sparseml.deepsparse.framework package

Submodules

sparseml.deepsparse.framework.info module

Functionality related to detecting and getting information for support and sparsification in the DeepSparse framework.

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

Detect the supported ML framework for a given item specifically for the deepsparse 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.deepsparse.framework.info.framework_info()sparseml.framework.info.FrameworkInfo[source]

Detect the information for the deepsparse 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 deepsparse

Return type

FrameworkInfo

sparseml.deepsparse.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 deepsparse, False otherwise

Return type

bool

Module contents

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