sparseml.pytorch.framework package¶
Submodules¶
sparseml.pytorch.framework.info module¶
Functionality related to detecting and getting information for support and sparsification in the PyTorch framework.
-
sparseml.pytorch.framework.info.
detect_framework
(item: Any) → sparseml.base.Framework[source]¶ Detect the supported ML framework for a given item specifically for the pytorch 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
-
sparseml.pytorch.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
Module contents¶
Functionality related to integrating with, detecting, and getting information for support and sparsification in the PyTorch framework.