27 buildPythonPackage rec {
32 src = fetchFromGitHub {
33 owner = "neuralmagic";
35 rev = "refs/tags/v${version}";
36 hash = "sha256-c4F95eVvj673eFO/rbmv4LY3pGmqo+arbsYqElznwdA=";
39 build-system = [ setuptools ];
41 pythonRelaxDeps = [ "onnx" ];
57 pythonImportsCheck = [ "sparsezoo" ];
65 # Require network access
68 "test_draw_operation_chart"
69 "test_draw_parameter_chart"
70 "test_draw_parameter_operation_combined_chart"
71 "test_draw_sparsity_by_layer_chart"
72 "test_extract_node_id"
73 "test_fail_default_on_empty"
74 "test_folder_structure"
75 "test_from_model_analysis"
76 "test_generate_outputs"
77 "test_get_layer_and_op_counts"
79 "test_get_node_bias_name"
80 "test_get_node_four_block_sparsity"
81 "test_get_node_num_four_block_zeros_and_size"
82 "test_get_node_num_zeros_and_size"
83 "test_get_node_sparsity"
84 "test_get_node_weight_and_shape"
85 "test_get_node_weight_name"
88 "test_graphql_api_response"
89 "test_is_four_block_sparse_layer"
90 "test_is_parameterized_prunable_layer"
91 "test_is_quantized_layer"
92 "test_is_sparse_layer"
93 "test_latency_extractor"
94 "test_load_files_from_stub"
95 "test_model_from_stub"
96 "test_model_gz_extraction_from_local_files"
97 "test_model_gz_extraction_from_stub"
100 "test_setup_model_from_objects"
101 "test_setup_model_from_paths"
105 disabledTestPaths = [
106 # Require network access
107 "tests/sparsezoo/analyze/test_model_analysis_creation.py"
108 "tests/sparsezoo/deployment_package/utils/test_utils.py"
112 description = "Neural network model repository for highly sparse and sparse-quantized models with matching sparsification recipes";
113 homepage = "https://github.com/neuralmagic/sparsezoo";
114 changelog = "https://github.com/neuralmagic/sparsezoo/releases/tag/v${version}";
115 license = lib.licenses.asl20;
116 maintainers = with lib.maintainers; [ GaetanLepage ];