Skip to content

Commit

Permalink
check_requirements(('coremltools',)) (#4478)
Browse files Browse the repository at this point in the history
* `check_requirements(('coremltools',))`

* Update ci-testing.yml

* Update ci-testing.yml
  • Loading branch information
glenn-jocher committed Aug 18, 2021
1 parent 1d65e81 commit d1182c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__}...')
Expand Down

0 comments on commit d1182c4

Please sign in to comment.