Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
fac57d8
Point to sparsezoo prod (#272)
rahul-tuli Feb 16, 2023
54c8327
`sparsezoo.deployment_package` (#261)
rahul-tuli Feb 17, 2023
f1cbb6e
`sparsezoo.analyze` (#263)
rahul-tuli Feb 17, 2023
a52d80b
Update README.md (#274)
jeanniefinks Feb 18, 2023
b92dbea
NM Standardization Tooling (#255)
bfineran Feb 28, 2023
80feb81
graphql requests module (#244)
Mar 20, 2023
25af3b3
Graphql queryparser fields (#270)
Mar 21, 2023
1ec7f06
sparsezoo.analyze-common-cli base (#279)
rahul-tuli Mar 22, 2023
76048be
fix type (#283)
Mar 23, 2023
a1235b2
`ModelAnalysis.create(...)` (#281)
rahul-tuli Mar 28, 2023
ff5c1e3
Summary updates for performance analysis (#285)
rahul-tuli Mar 28, 2023
ebe6362
Add GA for the SparseZoo and enable for Other Repos (#287)
markurtz Apr 3, 2023
f6844b8
Google Analtyics fixes (#289)
markurtz Apr 4, 2023
b060d3e
Early exit if NM_DISABLE_ANALYTICS is set (#290)
bnellnm Apr 5, 2023
f7d8588
add device_info to _extract_throughput (#294)
bfineran Apr 7, 2023
40ddac6
[Fix] - error in f-string log #296
dbogunowicz Apr 10, 2023
ff13615
Fix - error in f-string (this time in directory.py) (#298)
dbogunowicz Apr 11, 2023
2bb1252
fix return type annotation and tests (#282)
Apr 12, 2023
5d68384
error handling - send message from graphql (#286)
Apr 12, 2023
a9718cc
[analytics] disable in Makefile and GHA tests, unit test to always ch…
bfineran Apr 12, 2023
00ccfac
Stub v2 (#271)
Apr 12, 2023
86ce9ca
Remove: failing test as it was only extracting a value from the respo…
rahul-tuli Apr 18, 2023
4cde00b
Update: Analyze api, add DataStructures for summary (#288)
rahul-tuli Apr 19, 2023
7874dc1
Update CODE_OF_CONDUCT.md
jeanniefinks May 1, 2023
97cfea1
Update: missed python version during update (#307)
rahul-tuli May 2, 2023
1854d2a
Update README.md
jeanniefinks May 3, 2023
b82b82d
Update README.md
jeanniefinks May 4, 2023
a8b7ce8
Update DEVELOPING.md
jeanniefinks May 4, 2023
da19f19
Update CONTRIBUTING.md
jeanniefinks May 4, 2023
7e8e203
[fix] match metric names ignoring separators (#310)
bfineran May 8, 2023
62c123f
Helper functions for large ONNX models support (#308)
dbogunowicz May 8, 2023
c59eb24
initial commit (#314)
dbogunowicz May 18, 2023
2a0562a
[bugfix] defer matplotlib import error until used (#315)
rahul-tuli May 22, 2023
837e5a4
download from repo_name, repo_namespace if present (#309)
May 22, 2023
c2b5ae5
Make 'validate_onnx' function robust against the models loaded withou…
dbogunowicz May 25, 2023
960cae2
Suppress analytics errors and messages (#318)
markurtz May 26, 2023
9b5a0bd
Sparsezoo stdout fix (#322)
rahul-tuli May 31, 2023
960b213
[analytics] Made suppression fixes (#324)
rahul-tuli Jun 1, 2023
4486de9
Avoid appending to external data when running `onnx_save` (#320)
dbogunowicz Jun 2, 2023
fe36474
bump up version to 1.6.0 (#326)
dhuangnm Jun 2, 2023
7df6bed
Catch all exceptions (#327)
rahul-tuli Jun 2, 2023
ede4c8c
Cleanup loggers to prevent double-logging (#330)
mgoin Jun 7, 2023
f1c4b5e
Update minimum supported python to `3.8` (#331)
rahul-tuli Jun 8, 2023
f053d93
By default avoiding generating files in temp directory (#329)
dbogunowicz Jun 12, 2023
49c1845
upgrade onnx to 1.14 so pip install works on macOS (#334)
YixuanSeanZhou Jun 16, 2023
f6f4da2
Update numpy to 1.21.6 (#332)
rahul-tuli Jun 26, 2023
fcbd0b5
Set explicit ORT providers (#338)
KSGulin Jun 27, 2023
945616b
Lift protobuf restriction to allow onnx 1.14 (#337)
mgoin Jun 27, 2023
076968f
pin pydantic to <2.0 (#339)
bfineran Jun 30, 2023
a613dcc
clarify onnx external data path should be relative (#335)
bfineran Jul 3, 2023
73f491d
Add GHA workflow files to build nightly and release (#341)
dhuangnm Jul 12, 2023
a96eac7
fix minor issue (#342)
dhuangnm Jul 17, 2023
cb0b68b
Fix the dimension for nodes with 0 dim (#344)
dsikka Jul 17, 2023
4262b29
fix divide by zero error in analysis sparsity percent calculation (#345)
bfineran Jul 18, 2023
0fc7bbe
Add filepath endings to download logs (#346)
mgoin Jul 20, 2023
ee48de3
Update models.md (#312)
rgreenberg1 Jul 20, 2023
04c68cb
Add space to model stub error message (#347)
mgoin Jul 20, 2023
b484240
Update missed python version (#348)
rahul-tuli Jul 27, 2023
a516d08
fix a minor bug for release build (#350)
dhuangnm Jul 31, 2023
4577acf
default Model.onnx_model to target onnx.model.tar.gz (#355)
bfineran Aug 15, 2023
1943c1a
[Bugfix] Point OnnxGz files to `model.onnx` but download and extract …
rahul-tuli Aug 21, 2023
9aee643
Report GHA build results to Testmo (#358)
dhuangnm Aug 22, 2023
24cfe83
Also Extract model.onnx.tar.gz on Model download (#359)
rahul-tuli Aug 22, 2023
1f94aa9
sparsezoo download stub (#360)
Aug 25, 2023
dc603b1
[refactor] break ONNX utils/onnx.py into multiple files (#353)
bfineran Aug 29, 2023
8035607
split_external_data - helper to break ONNX model external data into m…
bfineran Aug 29, 2023
05e55e5
Request V2 files from graphql (#361)
Sep 7, 2023
9d9b2ba
Return appropriate files (#363)
Sep 11, 2023
47b67c7
fix typo (#364)
Sep 11, 2023
f2cf607
Restore "default" Property for Recipes (#366)
Satrat Sep 15, 2023
c6ff218
Add "available" attribute to recipes (#368)
Satrat Sep 22, 2023
038a113
Fix download path (#369)
Sep 25, 2023
32c2793
Use file download URL as provided by the API (#370)
Sep 26, 2023
77db6a0
Remove extraneous doctest import (#371)
rahul-tuli Oct 5, 2023
23f40e7
RegistryMixin - tooling for easier registry/plugin patterns across NM…
bfineran Oct 5, 2023
22f0f4b
Fix spacing in caution message (#372)
Oct 11, 2023
9ad762f
[feature] Add python3.11 support (#375)
rahul-tuli Oct 13, 2023
e9ad485
model.deployment to target compressed deployment directory (#373)
bfineran Oct 17, 2023
e97e582
fix issues for reporting and manual run (#382)
dhuangnm Oct 31, 2023
148ee55
Update README.md - New Model Call out (#374)
rgreenberg1 Nov 2, 2023
1c6ee99
Allow passing multiple name for registering a value in RegistryMixin …
dbogunowicz Nov 13, 2023
fe72195
Enable the easy download of the deployment.tar.gz (#379)
dbogunowicz Nov 14, 2023
a0e0946
split out docs deps in setup extras (#390)
bfineran Nov 22, 2023
cb3c1fe
Clean up relationship between deployment_tar and deployment (#389)
bfineran Dec 4, 2023
bbdad8b
bump up version to 1.7.0 (#405)
dhuangnm Dec 6, 2023
be48ff2
[V2 Analysis] Feature Branch (#393)
Dec 8, 2023
ff62777
Update NOTICE (#400)
rgreenberg1 Dec 18, 2023
c035b5b
[analytics] use 'nightly' for version datestamps (#406)
bfineran Dec 18, 2023
736327b
Update NOTICE (#409)
jeanniefinks Dec 19, 2023
820e2c6
Ort infernce bug (#408)
Dec 26, 2023
2532f7b
`RegistryMixin` improved alias management (#404)
dbogunowicz Jan 23, 2024
b05dd16
Move evaluator registry (#411)
rahul-tuli Jan 23, 2024
e725fa6
More control over external data size (#412)
dbogunowicz Jan 24, 2024
1ac94e6
When splitting external data, avoid renaming `model.data` to `model.d…
dbogunowicz Jan 25, 2024
f6a3fe1
[model.download] fix function returning nothing (#420)
dsikka Feb 1, 2024
6e0d12b
[BugFix] Path not expanded (#418)
rahul-tuli Feb 1, 2024
1a9ee4b
[Fix] Allow for processing Path in the sparsezoo analysis (#417)
dbogunowicz Feb 2, 2024
56d0744
Raise TypeError instead of ValueError (#426)
rahul-tuli Feb 5, 2024
a44a05e
Fix misleading docstring (#416)
rahul-tuli Feb 5, 2024
2eaea8f
add support for benchmark.yaml (#415)
bfineran Feb 5, 2024
fc00994
[BugFix] Add analyze to init (#421)
rahul-tuli Feb 6, 2024
b785e85
update analyze help message for correctness (#432)
bfineran Feb 6, 2024
e6b12f6
initial commit (#430)
dbogunowicz Feb 7, 2024
c1a096f
[sparsezoo.analyze] Fix pathway such that it works for larger models …
dsikka Feb 9, 2024
b2bfbec
Delete hehe.py (#439)
rahul-tuli Feb 10, 2024
461112f
Download deployment dir for llms (#435)
rahul-tuli Feb 12, 2024
6e9cdb3
only set save_as_external_data to true if the model originally had ex…
dsikka Feb 12, 2024
944128f
Add Channel Wise Quantization Support (#441)
rahul-tuli Feb 12, 2024
e2924c1
Chunk download (#429)
Feb 12, 2024
7e2bccd
fix type hints (#445)
Feb 13, 2024
cd1902d
fix bug if the value is a dict (#447)
Feb 13, 2024
6a8f04e
[deepsparse.analyze] Fix v1 functionality to work with llms (#451)
dsikka Feb 15, 2024
de28494
overwrite file (#450)
Feb 15, 2024
7a82196
Adds a `numpy_array_representer` to yaml (#454)
rahul-tuli Feb 15, 2024
cad3c17
Avoid division by zero (#457)
rahul-tuli Feb 16, 2024
a5a1557
op analysis total counts had double sparse counts (#461)
Feb 21, 2024
8950d69
Rename legacy analyze to analyze_v1 (#459)
rahul-tuli Feb 21, 2024
eff2482
Fixing Quant % Calcuation (#462)
Satrat Feb 22, 2024
a00ca1e
Include Sparsity in Size Calculation (#463)
Satrat Feb 22, 2024
bc7218a
external data fix (#466)
Satrat Feb 23, 2024
3b97dfc
add more info on what chunk is downloading, and make chunk folder foe…
Feb 28, 2024
b463e83
Download iso chunk folder (#470)
Feb 29, 2024
572bd82
Retire flaky (#474)
dbogunowicz Mar 5, 2024
cf2aabc
Multiple download bug (#476)
Mar 8, 2024
eabb28c
import util (#478)
Mar 11, 2024
42c687b
Add build workflows for dev, nightly, and release wheels (#473)
dsikka Mar 15, 2024
8378c57
bump up main to 1.8.0 (#479)
dhuangnm Mar 25, 2024
ef3850a
Update LLama 2 license reference and add license for Code Llama (#480)
Mar 27, 2024
65f8f27
Update README.md
jeanniefinks Apr 10, 2024
c137dd1
Update CONTRIBUTING.md
jeanniefinks Apr 10, 2024
393db75
Updated logo in README.md (#482)
rgreenberg1 Apr 11, 2024
f349af4
Update pydantic support (#483)
rahul-tuli Apr 23, 2024
6ae1b94
[BugFix] Fix Serialization of Computed Properties in BaseModel (#485)
rahul-tuli May 1, 2024
b4fb6fc
Update release build workflow to use the new scripts (#486)
dhuangnm Jun 17, 2024
db8f68f
update numpy version to match sparseml (#487)
bfineran Jun 18, 2024
0a50d3f
relax pydantic version restriction (#489)
dhuangnm Jul 19, 2024
9690351
Update README.md (#493)
jeanniefinks May 5, 2025
fe098ce
Final SparseZoo (#495)
jeanniefinks Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A clear and concise description of what you expected to happen.
**Environment**
Include all relevant environment information:
1. OS [e.g. Ubuntu 18.04]:
2. Python version [e.g. 3.7]:
2. Python version [e.g. 3.8]:
3. SparseZoo version or commit hash [e.g. 0.1.0, `f7245c8`]:
4. ML framework version(s) [e.g. torch 1.7.1]:
5. Other Python package versions [e.g. SparseML, DeepSparse, numpy, ONNX]:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: build-nightly
run-name: ${{ github.workflow }} is to create nightly wheel file for pypi
on:
push:
branches:
- 'main'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:


jobs:

BUILD-SPARSEZOO_NIGHTLY:

uses: ./.github/workflows/util.yml
with:
runs_on: ubuntu-22.04
run_id: ${{ github.run_id }}
build_type: nightly
testmo_project_id: 9
secrets: inherit
61 changes: 61 additions & 0 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build release wheel

on:
push:
branches:
- 'release/*'

workflow_dispatch:
inputs:
gitref:
description: "git tag, commit or branch name for the release"
type: string
required: true
default: 'release/1.8'

jobs:
build-release-wheel:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.gitref }}

- name: Build PyPi Wheel
id: build
uses: neuralmagic/nm-actions/actions/pypi_build@main
with:
dev: false
release: true

- name: Set Env
run: |
pip3 install --upgrade pip && pip3 install --upgrade setuptools
pip3 install virtualenv
virtualenv venv
source venv/bin/activate

- name: upload whl
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: "wheel-sparsezoo"
path: ${{ steps.build.outputs.whlname }}
retention-days: 7

- name: upload tar.gz
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: "tar-sparsezoo"
path: ${{ steps.build.outputs.tarname }}
retention-days: 7

- name: Install whl
run: |
pip3 install ${{ steps.build.outputs.whlname }}
58 changes: 58 additions & 0 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build PyPi Wheel
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- 'release/[0-9]+.[0-9]+'
push:
branches:
- main
release:
types: [created, published]
schedule:
- cron: '0 0 * * *'

permissions:
id-token: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

# if not dev or release, will create a nightly build
# everything is pushed to internal unless created through a nightly scheduled cron job which creates the build or
# missing release tag workflow/needs to be added in
env:
INTERNAL: ${{ github.event_name != 'schedule' && github.event_name != 'release'}}
RELEASE: ${{ github.event_name =='release' || (startsWith(github.base_ref, 'release/') && github.event_name == 'pull_request')}}
DEV: ${{ github.base_ref == 'main' && github.event_name == 'pull_request'}}
NAME: ${{ github.event.number }}

jobs:
build_and_push:
runs-on: ubuntu-latest
outputs:
wheel: ${{ steps.push-wheel.outputs.wheel }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to s3
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_WEBIDENTITY_FOR_GITHUB_ACTIONS }}
aws-region: us-east-1
- name: Build PyPi Wheel
id: build-wheel
uses: neuralmagic/nm-actions/actions/pypi_build@main
with:
dev: $DEV
release: $RELEASE
name: $NAME
- name: Push to s3 bucket
id: push-wheel
uses: neuralmagic/nm-actions/actions/s3_push@main
with:
filename: dist/*.whl
internal: $INTERNAL
6 changes: 6 additions & 0 deletions .github/workflows/result.xml.fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="BuildStatus" tests="1" failures="1" errors="1">
<testcase name="BuildStatus">
<failure message="build failed" type="Error"/>
</testcase>
</testsuite>
5 changes: 5 additions & 0 deletions .github/workflows/result.xml.success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="BuildStatus" tests="1" failures="0" errors="0">
<testcase name="BuildStatus">
</testcase>
</testsuite>
4 changes: 2 additions & 2 deletions .github/workflows/test-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
runs-on: ubuntu-latest
env:
SPARSEZOO_TEST_MODE: "true"
NM_DISABLE_ANALYTICS: "true"
needs: test-setup
if: ${{needs.test-setup.outputs.python-diff == 1}}
steps:
Expand All @@ -42,12 +43,11 @@ jobs:
run: pip3 install .[dev]
- name: "🔬 Running tests"
run: make test
env:
SPARSEZOO_API_URL: https://staging-api.neuralmagic.com
extensive-python-tests:
runs-on: ubuntu-latest
env:
SPARSEZOO_TEST_MODE: "true"
NM_DISABLE_ANALYTICS: "true"
needs: test-setup
if: ${{needs.test-setup.outputs.full-check == 1}}
steps:
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/util.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: report-to-testmo
on:
workflow_call:
inputs:
runs_on:
description: "runner label specifying instance running the job"
type: string
required: true
run_id:
description: "run id provided by GHA"
required: true
type: string
build_type:
description: "build type: nightly or release"
type: string
required: true
testmo_project_id:
description: "testmo project id"
type: string
required: true

jobs:

BUILD_AND_REPORT:
runs-on: ${{ inputs.runs_on }}
outputs:
status: ${{ steps.build.outputs.status }}
commitid: ${{ steps.build.outputs.commitid }}
permissions:
id-token: write
contents: read
steps:

- name: repo checkout
uses: actions/checkout@v3

- name: s3
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_WEBIDENTITY_FOR_GITHUB_ACTIONS }}
aws-region: us-east-1

- name: build
id: build
run: |
pwd
sudo apt-get -y install python3-pip
pip3 --version
sudo pip3 install virtualenv
virtualenv venv
source venv/bin/activate
pip install -e .
if [[ "${{ inputs.build_type }}" = release ]]; then
sed -i 's/is_release = False/is_release = True/g' src/${{ github.event.repository.name }}/version.py
fi
status=$(make -B build || echo 'FAILED')
deactivate
echo "=========== Build log ==========="
echo "${status}"
echo "commitid=${GITHUB_SHA:0:7}" >> "$GITHUB_OUTPUT"
echo "=========== Build status ==========="
if [[ "${status}" = "FAILED" ]]; then
echo "${{ github.event.repository.name }} build failed"
exitCode=1
else
echo "${{ github.event.repository.name }} build success"
exitCode=0
fi
echo "=========== Generated build ==========="
ls dist/
echo "=========== Copy build to S3 ==========="
aws s3 cp dist/*.whl s3://nm-github-actions/${{ github.event.repository.name }}/
if [ $? -eq 0 ]; then
echo "ok: copied to s3://nm-github-actions/${{ github.event.repository.name }}/"
else
echo "failed: copied to s3://nm-github-actions/${{ github.event.repository.name }}/"
exitCode=1
fi
if [ ${exitCode} -eq 1 ]; then
echo "status=failed" >> "$GITHUB_OUTPUT"
cp .github/workflows/result.xml.fail result.xml
else
echo "status=success" >> "$GITHUB_OUTPUT"
cp .github/workflows/result.xml.success result.xml
fi
oldDate=`date --date='-2 month' +%Y%m%d`
oldWhl=`(aws s3 ls s3://nm-github-actions/${{ github.event.repository.name }}/ | grep nightly | grep "${oldDate}") || echo "notfound"`
if [[ "${oldWhl}" != 'notfound' ]]; then
for oldwhl in $(echo "${oldWhl}" | awk '{print $4}')
do
echo "Remove old build ${oldwhl} in S3"
aws s3 rm s3://nm-github-actions/${{ github.event.repository.name }}/${oldwhl}
done
fi
# TESTMO
echo "node: $(node -v)"
echo "npm: $(npm -v)"
echo "Installing testmo cli..."
sudo npm install -g @testmo/testmo-cli
export TESTMO_TOKEN=${{ secrets.TESTMO_TEST_TOKEN }}
TESTMO_URL="https://neuralmagic.testmo.net"
todaytime=`date +%Y%m%d`
name="${{ github.event.repository.name }} ${{ inputs.build_type }} ${todaytime} ${GITHUB_SHA:0:7} RunID:${{ inputs.run_id }}"
echo "========== Build info ==========="
echo "name: ${name}"
echo "build: $GITHUB_OUTPUT"
echo "echo \"GHA job $GITHUB_OUTPUT: https://github.com/neuralmagic/${{ github.event.repository.name }}/actions/runs/${{ inputs.run_id }}\"; exit ${exitCode}" > result.sh
echo "========== Report to testmo ==========="
echo "testmo automation:run:submit \\"
echo " --instance ${TESTMO_URL} \\"
echo " --project-id ${{ inputs.testmo_project_id }} \\"
echo " --name ${name} \\"
echo " --source ${{ github.event.repository.name }} \\"
echo " --results result.xml"
testmo automation:run:submit \
--instance "${TESTMO_URL}" \
--project-id ${{ inputs.testmo_project_id }} \
--name "${name}" \
--source "${{ github.event.repository.name }}" \
--results result.xml \
-- bash result.sh
Loading