|
| 1 | +name: Keras2onnx Application Test Run |
| 2 | + |
| 3 | +inputs: |
| 4 | + tf_version: |
| 5 | + description: 'TensorFlow version' |
| 6 | + python_version: |
| 7 | + description: 'Python version' |
| 8 | + ort_version: |
| 9 | + description: 'ONNXRuntime version' |
| 10 | + onnx_version: |
| 11 | + description: 'ONNX version' |
| 12 | + |
| 13 | +runs: |
| 14 | + using: "composite" |
| 15 | + steps: |
| 16 | + - name: Set up Python (${{ inputs.python_version }}) |
| 17 | + uses: actions/setup-python@v5 |
| 18 | + with: |
| 19 | + python-version: ${{ inputs.python_version }} |
| 20 | + |
| 21 | + - name: Install dependencies (TF-v${{ inputs.tf_version }}) |
| 22 | + shell: bash |
| 23 | + run: | |
| 24 | + python -m pip install --upgrade pip |
| 25 | + pip install onnxconverter-common |
| 26 | + pip install onnx==${{ inputs.onnx_version }} |
| 27 | + pip uninstall -y protobuf |
| 28 | + pip install "protobuf~=3.20" |
| 29 | + pip install h5py==3.7.0 |
| 30 | + pip install parameterized |
| 31 | + pip install timeout-decorator |
| 32 | + pip install coloredlogs flatbuffers |
| 33 | + pip install tensorflow==${{ inputs.tf_version }} |
| 34 | + pip install onnxruntime==${{ inputs.ort_version }} |
| 35 | + pip install pillow |
| 36 | + pip install opencv-python |
| 37 | + pip install tqdm |
| 38 | + pip install keras-segmentation==0.2.0 |
| 39 | + git clone https://github.com/matterport/Mask_RCNN |
| 40 | + cd Mask_RCNN |
| 41 | + pip install -r requirements.txt |
| 42 | + python setup.py install |
| 43 | + cd .. |
| 44 | + pip install matplotlib |
| 45 | + git clone https://github.com/qqwweee/keras-yolo3 |
| 46 | + pip install keras-resnet |
| 47 | + pip install git+https://www.github.com/keras-team/keras-contrib.git |
| 48 | + pip install keras-tcn==2.8.3 |
| 49 | + pip install git+https://github.com/qubvel/efficientnet |
| 50 | + pip install keras-self-attention |
| 51 | + pip install pytest pytest-cov pytest-runner |
| 52 | +
|
| 53 | + if [[ ${{ inputs.tf_version }} == 1.* ]]; then |
| 54 | + pip install keras==2.3.1 |
| 55 | + pip install transformers==4.2.0 |
| 56 | + pip uninstall -y h5py |
| 57 | + pip install h5py==2.9.0 |
| 58 | + pip install numpy==1.19.0 |
| 59 | + else |
| 60 | + pip install transformers |
| 61 | + pip install "numpy<2" |
| 62 | + fi |
| 63 | +
|
| 64 | + pip install -e . |
| 65 | +
|
| 66 | + echo "----- List all of depdencies:" |
| 67 | + pip freeze --all |
| 68 | +
|
| 69 | + - name: Run keras_application_test (${{ runner.os }}) |
| 70 | + shell: bash |
| 71 | + run: | |
| 72 | + python -c "import onnxruntime" |
| 73 | + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml |
| 74 | + cd tests/keras2onnx_applications/nightly_build |
| 75 | + python run_all_v2.py |
0 commit comments