-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (55 loc) · 2.08 KB
/
forward_compatibility_keras_tests.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
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@v4
with:
fetch-depth: 0
- name: Install Python 3
uses: actions/setup-python@v5
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 }}