-
Notifications
You must be signed in to change notification settings - Fork 463
Expand file tree
/
Copy pathaction.yml
More file actions
55 lines (49 loc) · 1.68 KB
/
action.yml
File metadata and controls
55 lines (49 loc) · 1.68 KB
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
name: Keras2onnx Unit Test Run
inputs:
tf_version:
description: 'TensorFlow version'
python_version:
description: 'Python version'
ort_version:
description: 'ONNXRuntime version'
onnx_version:
description: 'ONNX version'
runs:
using: "composite"
steps:
- name: Set up Python (${{ inputs.python_version }})
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
- name: Install dependencies (TF-v${{ inputs.tf_version }})
shell: bash
run: |
python -m pip install --upgrade pip
pip install onnxconverter-common
pip install onnx==${{ inputs.onnx_version }}
pip install h5py==3.7.0
pip install parameterized
pip install timeout-decorator
pip install coloredlogs flatbuffers
pip install tensorflow==${{ inputs.tf_version }}
pip install pytest pytest-cov pytest-runner
pip install onnxruntime==${{ inputs.ort_version }}
pip uninstall -y protobuf
pip install "protobuf~=3.20"
if [[ ${{ inputs.tf_version }} == 1.* ]]; then
pip install numpy==1.19.0
else
pip install tf_keras
pip install "numpy<2"
fi
pip install -e .
echo "----- List all of depdencies:"
pip freeze --all
- name: Run keras_unit_test (Linux)
shell: bash
if: runner.os == 'Linux'
run: |
export TF_USE_LEGACY_KERAS=True
python -c "import onnxruntime"
python -c "import onnxconverter_common"
pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml