check_requirements(('coremltools',)) (#4478)
* `check_requirements(('coremltools',))`
* Update ci-testing.yml
* Update ci-testing.yml
This commit is contained in:
1 parent
1d65e8194d
commit
d1182c4f29
2 files changed
+3
-2
No files matched your search
@@ -48,7 +48,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -qr requirements.txt -f https://download.pytorch.org/whl/cpu/torch_stable.html
|
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
|
python --version
|
||||||
pip --version
|
pip --version
|
||||||
pip list
|
pip list
|
||||||
@@ -76,5 +76,5 @@ jobs:
|
|||||||
|
|
||||||
python hubconf.py # hub
|
python hubconf.py # hub
|
||||||
python models/yolo.py --cfg ${{ matrix.model }}.yaml # inspect
|
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
|
shell: bash
|
||||||
@@ -87,6 +87,7 @@ def export_coreml(model, img, file):
|
|||||||
# CoreML model export
|
# CoreML model export
|
||||||
prefix = colorstr('CoreML:')
|
prefix = colorstr('CoreML:')
|
||||||
try:
|
try:
|
||||||
|
check_requirements(('coremltools',))
|
||||||
import coremltools as ct
|
import coremltools as ct
|
||||||
|
|
||||||
print(f'\n{prefix} starting export with coremltools {ct.__version__}...')
|
print(f'\n{prefix} starting export with coremltools {ct.__version__}...')
|
||||||
|
|||||||
Reference in new issue
Block a user