forked from sony/mct_quantizers
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support forward compatibility (sony#81)
Forward compatibility with 1.3.0 isn't tested because there's a bug in that version's tests
- Loading branch information
Showing
9 changed files
with
188 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Run Keras Quantizers Forward Compatibility Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
load_version: | ||
description: 'MCT Quantizers version to load models' | ||
required: true | ||
type: string | ||
python_version: | ||
description: 'Python version' | ||
required: true | ||
type: string | ||
default: '3.10.*' | ||
tf_version: | ||
description: 'TF version' | ||
required: true | ||
type: string | ||
default: '2.12.*' | ||
|
||
jobs: | ||
run-tensorflow-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Python 3 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install tensorflow==${{ inputs.tf_version }} | ||
- name: Run save model tests with latest version | ||
run: | | ||
cd tests | ||
echo "Current directory: $PWD" | ||
export PYTHONPATH="$PWD:${PYTHONPATH}" | ||
echo "Updated PYTHONPATH: $PYTHONPATH" | ||
cd .. | ||
python tests/compatibility_tests/keras_comp_tests/compatibility_weights_save_model_test_suite.py ${{ inputs.load_version }} | ||
python tests/compatibility_tests/keras_comp_tests/compatibility_activation_save_model_test_suite.py ${{ inputs.load_version }} | ||
- name: Checkout to MCT Quantizers requested tag for loading test models | ||
run: | | ||
git checkout tags/${{ inputs.load_version }} | ||
- name: Run load model tests with load_version | ||
run: | | ||
cd tests | ||
echo "Current directory: $PWD" | ||
export PYTHONPATH="$PWD:${PYTHONPATH}" | ||
echo "Updated PYTHONPATH: $PYTHONPATH" | ||
cd .. | ||
python tests/compatibility_tests/keras_comp_tests/compatibility_weights_load_model_test_suite.py ${{ inputs.load_version }} | ||
python tests/compatibility_tests/keras_comp_tests/compatibility_activation_load_model_test_suite.py ${{ inputs.load_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Run Torch Quantizers Forward Compatibility Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
load_version: | ||
description: 'MCT Quantizers version to load models' | ||
required: true | ||
type: string | ||
python_version: | ||
description: 'Python version' | ||
required: true | ||
type: string | ||
default: '3.10.*' | ||
torch_version: | ||
description: 'Torch version' | ||
required: true | ||
type: string | ||
default: '2.0.*' | ||
|
||
jobs: | ||
run-torch-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Python 3 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install torch==${{ inputs.torch_version }} onnx onnxruntime onnxruntime-extensions | ||
- name: Run save model tests with latest version | ||
run: | | ||
cd tests | ||
echo "Current directory: $PWD" | ||
export PYTHONPATH="$PWD:${PYTHONPATH}" | ||
echo "Updated PYTHONPATH: $PYTHONPATH" | ||
cd .. | ||
python tests/compatibility_tests/torch_comp_tests/compatibility_weights_save_model_test_suite.py ${{ inputs.load_version }} | ||
python tests/compatibility_tests/torch_comp_tests/compatibility_activation_save_model_test_suite.py ${{ inputs.load_version }} | ||
- name: Checkout to MCT Quantizers requested tag for loading test models | ||
run: | | ||
git checkout tags/${{ inputs.load_version }} | ||
- name: Run load model tests with load_version | ||
run: | | ||
cd tests | ||
echo "Current directory: $PWD" | ||
export PYTHONPATH="$PWD:${PYTHONPATH}" | ||
echo "Updated PYTHONPATH: $PYTHONPATH" | ||
cd .. | ||
python tests/compatibility_tests/torch_comp_tests/compatibility_weights_load_model_test_suite.py ${{ inputs.load_version }} | ||
python tests/compatibility_tests/torch_comp_tests/compatibility_activation_load_model_test_suite.py ${{ inputs.load_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Run Forward Compatibility Test - Tensorflow 2.12 MCTQ v1.4.0 | ||
on: | ||
workflow_dispatch: # Allow manual triggers | ||
schedule: | ||
- cron: 0 0 * * * | ||
|
||
jobs: | ||
run-forward-comp-tensorflow-2_12-v1_4: | ||
uses: ./.github/workflows/forward_compatibility_keras_tests.yml | ||
with: | ||
load_version: "v1.4.0" | ||
python_version: "3.10" | ||
tf_version: "2.12.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Run Forward Compatibility Test - Tensorflow 2.13 MCTQ v1.4.0 | ||
on: | ||
workflow_dispatch: # Allow manual triggers | ||
schedule: | ||
- cron: 0 0 * * * | ||
|
||
jobs: | ||
run-forward-comp-tensorflow-2_13-v1_4: | ||
uses: ./.github/workflows/forward_compatibility_keras_tests.yml | ||
with: | ||
load_version: "v1.4.0" | ||
python_version: "3.10" | ||
tf_version: "2.13.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Run Forward Compatibility Test - Tensorflow 2.14 MCTQ v1.4.0 | ||
on: | ||
workflow_dispatch: # Allow manual triggers | ||
schedule: | ||
- cron: 0 0 * * * | ||
|
||
jobs: | ||
run-forward-comp-tensorflow-2_14-v1_4: | ||
uses: ./.github/workflows/forward_compatibility_keras_tests.yml | ||
with: | ||
load_version: "v1.4.0" | ||
python_version: "3.10" | ||
tf_version: "2.14.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Run Forward Compatibility Test - Pytorch 2.0 MCTQ v1.4.0 | ||
on: | ||
workflow_dispatch: # Allow manual triggers | ||
schedule: | ||
- cron: 0 0 * * * | ||
|
||
jobs: | ||
run-comp-torch-2_0-v1_4: | ||
uses: ./.github/workflows/forward_compatibility_torch_tests.yml | ||
with: | ||
load_version: "v1.4.0" | ||
python_version: "3.10" | ||
torch_version: "2.0.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Run Forward Compatibility Test - Pytorch 2.1 MCTQ v1.4.0 | ||
on: | ||
workflow_dispatch: # Allow manual triggers | ||
schedule: | ||
- cron: 0 0 * * * | ||
|
||
jobs: | ||
run-comp-torch-2_1-v1_4: | ||
uses: ./.github/workflows/forward_compatibility_torch_tests.yml | ||
with: | ||
load_version: "v1.4.0" | ||
python_version: "3.10" | ||
torch_version: "2.1.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters