Skip to content

Commit 6d3269a

Browse files
committed
Force old coreml api to fix failing test
Between the previous ci_gpu image and the one in use now, the version of coreml has changed since it is unpinned (6.3.0 -> 7.0.0). This caused a test failure in the coreml frontend tests. The problem is that coreml now uses a new default format for models. This commit forces coreml to use the old model format so the test passes. More information can be found here: https://apple.github.io/coremltools/docs-guides/source/convert-learning-models.html Change-Id: Id2273ccac0ae771f10dda6590e9f4cdd657a5d25
1 parent 416a33a commit 6d3269a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/python/frontend/coreml/test_forward.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,9 @@ def test_can_build_keras_to_coreml_to_relay():
823823
kmodel_fn = path.join(tmpdir, "c1mdl.h5")
824824
model.save(kmodel_fn)
825825

826-
mdl = cm.convert(kmodel_fn)
826+
mdl = cm.convert(
827+
kmodel_fn, convert_to="neuralnetwork", minimum_deployment_target=cm.target.macOS11
828+
)
827829
model_file = path.join(tmpdir, "c1.mlmodel")
828830
mdl.save(model_file)
829831

0 commit comments

Comments
 (0)