diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 02e8f74bf56c..ecd6f9bbd625 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -48,7 +48,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -qr requirements.txt -f https://download.pytorch.org/whl/cpu/torch_stable.html - pip install -q onnx + pip install -q onnx onnx-simplifier coremltools # for export python --version pip --version pip list @@ -76,5 +76,5 @@ jobs: python hubconf.py # hub python models/yolo.py --cfg ${{ matrix.model }}.yaml # inspect - python export.py --img 128 --batch 1 --weights ${{ matrix.model }}.pt # export + python export.py --img 128 --batch 1 --weights ${{ matrix.model }}.pt --include onnx torchscript # export shell: bash diff --git a/export.py b/export.py index db805cb45e6e..674609463a9d 100644 --- a/export.py +++ b/export.py @@ -87,6 +87,7 @@ def export_coreml(model, img, file): # CoreML model export prefix = colorstr('CoreML:') try: + check_requirements(('coremltools',)) import coremltools as ct print(f'\n{prefix} starting export with coremltools {ct.__version__}...')