Skip to content

Force onnx names on exported Hailo models #408

Force onnx names on exported Hailo models

Force onnx names on exported Hailo models #408

Workflow file for this run

name: Unit Tests
on:
pull_request:
branches: [main]
paths:
- modelconverter/__init__.py
- requirements.txt
- 'tests/test_utils/**'
- 'modelconverter/**'
- '.github/workflows/unittests.yaml'
workflow_call:
inputs:
ml_ref:
description: 'luxonis-ml version (branch/tag/SHA)'
required: true
type: string
modelconv_ref:
description: 'modelconverter version (branch/tag/SHA)'
required: true
type: string
secrets:
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
AWS_S3_ENDPOINT_URL:
required: true
GCP_CREDENTIALS:
description: 'Google service account JSON'
required: true
HUBAI_API_KEY:
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
utils-test:
runs-on: ubuntu-latest
steps:
- name: Checkout at modelconv_ref
if: ${{ inputs.modelconv_ref != '' }}
uses: actions/checkout@v4
with:
repository: Luxonis/modelconverter
ref: ${{ inputs.modelconv_ref }}
path: modelconverter
- name: Checkout code
if: ${{ inputs.modelconv_ref == '' && inputs.ml_ref == '' }}
uses: actions/checkout@v4
with:
path: modelconverter
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
- name: Install package
working-directory: modelconverter
run: python -m pip install -e .[dev]
- name: Install specified luxonis-ml
shell: bash
env:
ML_REF: ${{ inputs.ml_ref }}
if: ${{ inputs.ml_ref != '' }}
run: |
pip uninstall luxonis-ml -y
pip install \
"luxonis-ml[data,nn_archive] @ git+https://github.com/luxonis/luxonis-ml.git@${ML_REF}" \
--upgrade --force-reinstall
- name: Run Unit Tests
working-directory: modelconverter
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_ENDPOINT_URL: ${{ secrets.AWS_S3_ENDPOINT_URL }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
HUBAI_API_KEY: ${{ secrets.HUBAI_API_KEY }}
run: python -m pytest tests/test_utils