From a43bb4692a26eb82fbd8aaf3acef2bb797d08b45 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 18 Aug 2021 20:52:28 +0200 Subject: [PATCH 1/3] `check_requirements(('coremltools',))` --- export.py | 1 + 1 file changed, 1 insertion(+) 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__}...') From 497ed3c1efacfd15f5eb918064375d934d2aad3e Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 18 Aug 2021 21:02:56 +0200 Subject: [PATCH 2/3] Update ci-testing.yml --- .github/workflows/ci-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 02e8f74bf56c..82736a897c4a 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 coremltools python --version pip --version pip list From e257f69ac8738a492a06758e175110a1d50e842a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 18 Aug 2021 21:10:03 +0200 Subject: [PATCH 3/3] Update ci-testing.yml --- .github/workflows/ci-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 82736a897c4a..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 coremltools + 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