swift-coreml-transformers icon indicating copy to clipboard operation
swift-coreml-transformers copied to clipboard

Command CoreMLModelCompile failed with a nonzero exit code

Open Elwin-zhao opened this issue 4 years ago • 7 comments

Command CoreMLModelCompile failed with a nonzero exit code

Elwin-zhao avatar Apr 22 '20 01:04 Elwin-zhao

You'll need to provide more info, @ITBackkom.

Usually there is an additional error message that explains why CoreMLModelCompile failed (you can see this in the build log pane in Xcode). What does this error message say?

Which model does it fail on?

What is the file size of that model file when you look at it with Finder?

hollance avatar Apr 22 '20 10:04 hollance

I'm also running into this. I think this is the error you're looking for:

coremlc: Error: Error reading protobuf spec. validator error: unable to deserialize object

image

Using Xcode 11.5 on macOS 10.15.3. Simply downloaded the zip and tried to build project/run tests/run project.

mredig avatar May 28 '20 03:05 mredig

What is the file size of that model file when you look at it with Finder?

This repo uses git-lfs to store the large model files. Most likely, your model file is only a few bytes in size and is a placeholder for the actual thing.

hollance avatar May 28 '20 10:05 hollance

What is the file size of that model file when you look at it with Finder?

This repo uses git-lfs to store the large model files. Most likely, your model file is only a few bytes in size and is a placeholder for the actual thing.

I’m pretty sure this is correct. Did I miss any getting started instructions anywhere? I downloaded the zip instead of cloning, if that makes a difference at all.

mredig avatar May 28 '20 18:05 mredig

Yes that's definitely the reason then. Thanks @hollance for helping.

You need to install git-lfs following https://github.com/huggingface/swift-coreml-transformers#notes

julien-c avatar May 28 '20 19:05 julien-c

Does that mean that downloading the zip is useless? (might warrant a readme update)

mredig avatar May 28 '20 20:05 mredig

Apple has sample code and model that runs without requiring lfs.

jeffxtang avatar Jul 07 '20 20:07 jeffxtang