sparsezoo package

Submodules

sparsezoo.main module

Script to download a model from sparse zoo

Download objects from the SparseZoo

positional arguments:

{download,search}

optional arguments:
-h , --help

show this help message and exit

[–sub-architecture SUB_ARCHITECTURE] [–framework FRAMEWORK] [–repo REPO] [–dataset DATASET] [–training-scheme TRAINING_SCHEME] [–sparse-name OPTIM_NAME] [–sparse-category OPTIM_CATEGORY] [–sparse-target OPTIM_TARGET] [–release-version RELEASE_VERSION] [–page PAGE] [–page-length PAGE_LENGTH]

Search for objects from the repo.

optional arguments:
-h , --help

show this help message and exit

--domain DOMAIN

The domain of the model the object belongs to; e.g. cv, nlp

--sub-domain SUB_DOMAIN

The sub domain of the model the object belongs to; e.g. classification, segmentation

--architecture ARCHITECTURE

The architecture of the model the object belongs to; e.g. resnet_v1, mobilenet_v1

--sub-architecture SUB_ARCHITECTURE

The sub architecture (scaling factor) of the model the object belongs to; e.g. 50, 101, 152

--framework FRAMEWORK

The framework the model the object belongs to was trained on; e.g. pytorch, tensorflow

--repo REPO

The source repo for the model the object belongs to; e.g. sparseml, torchvision

--dataset DATASET

The dataset the model the object belongs to was trained on; e.g. imagenet, cifar10

--training-scheme TRAINING_SCHEME

The training scheme used on the model the object belongs to if any; e.g. augmented

--sparse-name OPTIM_NAME

The name describing the sparsification of the model the object belongs to, e.g. base, pruned, pruned_quant

--sparse-category OPTIM_CATEGORY

The degree of sparsification of the model the object belongs to; e.g. none, conservative (~100 baseline metric), moderate (>=99 baseline metric), aggressive (<99 baseline metric)

--sparse-target OPTIM_TARGET

The deployment target of sparsification of the model the object belongs to; e.g. edge, deepsparse, deepsparse_throughput, gpu

--release-version RELEASE_VERSION

the max release version of the model in semantic version format

--page PAGE

The page of search results to view

--page-length PAGE_LENGTH

The amount of search results per page to view

[–sub-architecture SUB_ARCHITECTURE] –framework FRAMEWORK –repo REPO –dataset DATASET [–training-scheme TRAINING_SCHEME] –sparse-name OPTIM_NAME –sparse-category OPTIM_CATEGORY [–sparse-target OPTIM_TARGET] [–release-version RELEASE_VERSION] [–save-dir SAVE_DIR]

Download a specific model from the repo.

optional arguments:
-h , --help

show this help message and exit

--domain DOMAIN

The domain of the model the object belongs to; e.g. cv, nlp

--sub-domain SUB_DOMAIN

The sub domain of the model the object belongs to; e.g. classification, segmentation

--architecture ARCHITECTURE

The architecture of the model the object belongs to; e.g. resnet_v1, mobilenet_v1

--sub-architecture SUB_ARCHITECTURE

The sub architecture (scaling factor) of the model the object belongs to; e.g. 50, 101, 152

--framework FRAMEWORK

The framework the model the object belongs to was trained on; e.g. pytorch, tensorflow

--repo REPO

The source repo for the model the object belongs to; e.g. sparseml, torchvision

--dataset DATASET

The dataset the model the object belongs to was trained on; e.g. imagenet, cifar10

--training-scheme TRAINING_SCHEME

The training scheme used on the model the object belongs to if any; e.g. augmented

--sparse-name OPTIM_NAME

The name describing the sparsification of the model the object belongs to, e.g. base, pruned, pruned_quant

--sparse-category OPTIM_CATEGORY

The degree of sparsification of the model the object belongs to; e.g. none, conservative (~100 baseline metric), moderate (>=99 baseline metric), aggressive (<99 baseline metric)

--sparse-target OPTIM_TARGET

The deployment target of sparsification of the model the object belongs to; e.g. edge, deepsparse, deepsparse_throughput, gpu

--release-version RELEASE_VERSION

the max release version of the model in semantic version format

--save-dir SAVE_DIR

The directory to save the model files in, defaults to the cwd with the model description as a sub folder

sparsezoo.main. main ( ) [source]

sparsezoo.package module

sparsezoo.package. check_package_version ( package_name : str , package_version : str , package_integration : Optional [ str ] = None ) [source]

Run a background thread to run version-check api

Parameters
  • package_name – package name of the client

  • package_version – package version of the client

  • package_integration – package integration of the client

sparsezoo.package. package_version_check_request ( package_name : str , package_version : str , package_integration : Optional [ str ] ) [source]

Make an api call to api-neuralmagic.com, retrieve payload and check if the user is on the latest package version. Lambda: nm-get-latest-version

Parameters
  • package_name – package name of the client

  • package_version – package version of the client

  • package_integration – package integration of the client

sparsezoo.package. version_check_execution_condition ( package_name : str , package_version : str , package_integration : Optional [ str ] ) [source]

Check if conditions are met to run the version-check api

Parameters
  • package_name – package name of the client

  • package_version – package version of the client

  • package_integration – package integration of the client

sparsezoo.version module

Functionality for storing and setting the version info for SparseZoo

Module contents

  • Functionality for accessing models, recipes, and supporting files in the SparseZoo

  • Notify the user the last pypi package version