Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

various updates to "build whl" workflow #59

Merged
merged 30 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
44d9eb1
on the road to whl files
Feb 26, 2024
a7cfed2
typo
Feb 26, 2024
343ba5e
missing prefix
Feb 26, 2024
9fdf42a
add some testing
Feb 27, 2024
50427f3
let's see
Feb 27, 2024
928f387
take a look
Feb 27, 2024
6451500
snapshot
Feb 27, 2024
22d4ee6
Merge remote-tracking branch 'origin/main' into whl-update
Feb 27, 2024
288ccf2
let's go
Feb 27, 2024
483e951
undo remote push bypass
Feb 28, 2024
b80238e
Merge remote-tracking branch 'origin/main' into whl-update
Feb 28, 2024
1a4feea
set env TORCH_CUDA_ARCH_LIST add summary
Feb 28, 2024
246e804
typo
Feb 28, 2024
add54b1
Merge remote-tracking branch 'origin/main' into whl-update
Feb 28, 2024
f0ae709
Merge remote-tracking branch 'origin/main' into whl-update
Feb 29, 2024
d51eefa
skip tests ... HF keeps flaking out
Feb 29, 2024
4649886
Merge remote-tracking branch 'origin/main' into whl-update
Feb 29, 2024
6291cdb
exclude "neuralmagic" and "tests"
Feb 29, 2024
b4d88e0
okay ...
Feb 29, 2024
e90cbbf
try find_packages update
Feb 29, 2024
5ab6bf9
remove neuralmagic init files and add licenses
Mar 1, 2024
1ff35d2
reset manifests and setuptools.find_packages
Mar 1, 2024
3fab688
Merge remote-tracking branch 'origin/main' into whl-update
Mar 1, 2024
c9501c7
Merge remote-tracking branch 'origin/whl-update' into whl-update
Mar 1, 2024
77bedad
Merge branch 'main' into whl-update
mgoin Mar 1, 2024
2248130
Merge remote-tracking branch 'origin/main' into whl-update
Mar 1, 2024
b593288
clean-up
Mar 1, 2024
960b88a
Merge remote-tracking branch 'origin/whl-update' into whl-update
Mar 1, 2024
f7e4935
missing action
Mar 1, 2024
0570b06
alright
Mar 1, 2024
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
3 changes: 2 additions & 1 deletion .github/actions/nm-build-vllm-whl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ outputs:
value: ${{ steps.whl.outputs.status }}
whl:
description: 'basename for generated whl'
value: ${{ steps.build_whl.outputs.whl }}
value: ${{ steps.whl.outputs.whl }}
runs:
using: composite
steps:
Expand All @@ -25,6 +25,7 @@ runs:
SUCCESS=0
pip3 wheel --no-deps -w dist . || SUCCESS=$?
echo "status=${SUCCESS}" >> "$GITHUB_OUTPUT"
ls -alh dist/
BASE=$(./.github/scripts/convert-version ${{ inputs.python }})
WHL_FILEPATH=$(find dist -iname "*nm_vllm*${BASE}*.whl")
WHL=$(basename ${WHL_FILEPATH})
Expand Down
40 changes: 40 additions & 0 deletions .github/actions/nm-install-test-whl/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: install and test whl
description: 'install whl in venv and run tests'
inputs:
python:
description: 'python version, e.g. 3.10.12'
required: true
venv:
description: 'name for python virtual environment'
required: true
whl:
description: 'filepath for magic_wand whl file'
required: true
test_directory:
description: 'directory to test files'
required: true
test_results:
description: 'desired directory for test results'
required: true
outputs:
status:
description: 'return test result'
value: ${{ steps.whl_install_test.outputs.status }}
runs:
using: composite
steps:
- id: whl_install_test
run: |
COMMIT=${{ github.sha }}
VENV="${{ inputs.venv }}-${COMMIT:0:7}"
pyenv virtualenv ${VENV}
source $(pyenv root)/versions/${{ inputs.python }}/envs/${VENV}/bin/activate
pip3 list
ls -alh dist
pip3 install ${{ inputs.whl }}
pip3 install -r requirements-dev.txt
SUCCESS=0
./.github/scripts/run-tests -t ${{ inputs.test_directory }} -r ${{ inputs.test_results }} || SUCCESS=$?
echo "status=${SUCCESS}" >> "$GITHUB_OUTPUT"
exit ${SUCCESS}
shell: bash
1 change: 1 addition & 0 deletions .github/actions/nm-set-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ runs:
using: composite
steps:
- run: |
echo "TORCH_CUDA_ARCH_LIST=7.0 7.5 8.0 8.6 8.9 9.0+PTX" >> $GITHUB_ENV
echo "HF_TOKEN=${HF_TOKEN_SECRET}" >> $GITHUB_ENV
echo "HF_HOME=/EFS/hf_home" >> $GITHUB_ENV
NUM_THREADS=$(./.github/scripts/determine-threading -G ${{ inputs.Gi_per_thread }})
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/nm-test-vllm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
source $(pyenv root)/versions/${{ inputs.python }}/envs/${VENV}/bin/activate
pip3 install --index-url http://${{ inputs.pypi }}:8080/ --trusted-host ${{ inputs.pypi }} magic-wand
pip3 install -r requirements-dev.txt
# run tests via runner script (serially)
# run tests via runner script
SUCCESS=0
./.github/scripts/run-tests -t ${{ inputs.test_directory }} -r ${{ inputs.test_results }} || SUCCESS=$?
echo "was this a SUCCESS? ${SUCCESS}"
Expand Down
42 changes: 38 additions & 4 deletions .github/workflows/build-whl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ on:
required: true

env:
VENV_BASE: "WHL-TEST"
VENV_BUILD_BASE: "BUILD"
VENV_WHL_BASE: "WHL-TEST"
WHL_TEST_RESULTS: "whl-test-results"

jobs:
Expand Down Expand Up @@ -81,7 +82,7 @@ jobs:
uses: ./.github/actions/nm-set-python/
with:
python: ${{ inputs.python }}
venv: ${{ env.VENV_BASE }}
venv: ${{ env.VENV_BUILD_BASE }}

- name: create testmo run
id: create_testmo_run
Expand All @@ -102,14 +103,25 @@ jobs:
with:
Gi_per_thread: ${{ inputs.Gi_per_thread }}
python: ${{ inputs.python }}
venv: ${{ env.VENV_BASE }}
venv: ${{ env.VENV_BUILD_BASE }}
pypi: ${{ secrets.NM_PRIVATE_PYPI_LOCATION }}

- name: build whl
id: build_whl
uses: ./.github/actions/nm-build-vllm-whl/
with:
python: ${{ inputs.python }}
venv: ${{ env.VENV_BUILD_BASE }}

# - name: install and test whl
# id: test
# uses: ./.github/actions/nm-install-test-whl/
# with:
# python: ${{ inputs.python }}
# venv: ${{ env.VENV_WHL_BASE }}
# whl: dist/${{ steps.build_whl.outputs.whl }}
# test_directory: tests
# test_results: ${{ env.WHL_TEST_RESULTS }}

- name: upload whl
uses: actions/upload-artifact@v4
Expand All @@ -119,8 +131,30 @@ jobs:
path: dist/${{ steps.build_whl.outputs.whl }}
retention-days: 15

# - name: report test results
# id: report_test
# uses: ./.github/actions/nm-testmo-run-submit-thread/
# if: success() || failure()
# with:
# testmo_url: https://neuralmagic.testmo.net
# testmo_token: ${{ secrets.TESTMO_TEST_TOKEN }}
# testmo_run_id: ${{ steps.create_testmo_run.outputs.id }}
# results: ${{ env.WHL_TEST_RESULTS }}
# step_status: ${{ steps.test.outputs.status }}

# - name: run summary
# id: summary
# uses: ./.github/actions/nm-whl-summary/
# with:
# label: ${{ inputs.build_label }}
# gitref: ${{ inputs.gitref }}
# testmo_run_url: https://neuralmagic.testmo.net/automation/runs/view/${{ steps.create_testmo_run.outputs.id }}
# python: ${{ inputs.python }}
# whl: ${{ steps.build_whl.outputs.whl }}
# test_status: ${{ steps.test.outputs.status }}

- name: complete testmo run
uses: ./.github/actions/testmo-run-complete/
uses: ./.github/actions/nm-testmo-run-complete/
if: success() || failure()
with:
testmo_url: https://neuralmagic.testmo.net
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ include requirements.txt

recursive-include licenses *
recursive-include csrc *

recursive-exclude neuralmagic *
recursive-exclude tests *
Empty file removed neuralmagic/__init__.py
Empty file.
4 changes: 0 additions & 4 deletions neuralmagic/benchmarks/__init__.py

This file was deleted.

Empty file.
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,16 @@ def get_requirements() -> List[str]:
"License :: OSI Approved :: Apache Software License",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
packages=setuptools.find_packages(exclude=("benchmarks", "csrc", "docs",
"examples", "tests")),
license_files=('LICENSE', 'licenses/LICENSE.apache',
'licenses/LICENSE.awq',
'licenses/LICENSE.fastertransformer',
'licenses/LICENSE.gptq', 'licenses/LICENSE.marlin',
'licenses/LICENSE.punica', 'licenses/LICENSE.squeezellm',
'licenses/LICENSE.tensorrtllm', 'licenses/LICENSE.vllm'),
packages=setuptools.find_packages(where=ROOT_DIR,
include=("vllm", "licenses", "csrc"),
exclude=("neuralmagic", "benchmarks",
"docs", "examples", "tests")),
python_requires=">=3.8",
install_requires=get_requirements(),
ext_modules=ext_modules,
Expand Down
Loading