forked from sony/mct_quantizers
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (60 loc) · 2.03 KB
/
run_tests_suite_pip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Test pip install
on:
workflow_dispatch: # Allow manual triggers
inputs:
mct_quantizers_version:
description: 'MCT Quantizers version'
required: true
default: 'v1.1.0'
python_version:
description: 'Python version'
required: false
default: '3.10'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python 3
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
- name: Install dependencies
run: |
git checkout tags/${{ inputs.mct_quantizers_version }}
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install twine wheel
- name: Build WHL file
run: |
version=$(python -c 'import mct_quantizers; print(mct_quantizers.__version__)')
now=$(date +'%Y%m%d-%H%M%S')
echo "nightly_version=$version.$now" >> $GITHUB_ENV
sed -i "s/attr: mct_quantizers.__version__/$version.$now/g" setup.cfg
sed -i "s/name='mct_quantizers'/name='mct-quantizers'/g" setup.py
python setup.py sdist bdist_wheel
- name: Install WHL file
run: |
whl_file=$(find . -iname "*.whl")
echo $whl_file
pip install $whl_file
pip list
python -c 'import mct_quantizers; print(mct_quantizers.__version__)'
- name: Remove MCT Quantizers code
run: |
rm -rf mct_quantizers
- name: Install TF
run: |
pip install tensorflow==2.14.*
- name: Run TF Tests
run: |
python -m unittest discover tests/keras_tests --verbose
- name: Prepare for Torch
run: |
pip uninstall tensorflow -y
pip install torch==2.0.* torchvision onnx onnxruntime onnxruntime-extensions
- name: Run Torch Tests
run: |
python -m unittest discover tests/pytorch_tests --verbose