Closed infinityp913 closed 4 years ago
Hi @infinityp913. This looks like a versioning issue with coremltools. In Apple's latest release of the package, they broke some support of converter functionality. As referenced in the requirements.txt of the onnx-ecosystem docker image, where the converter notebook you linked is from, we recommend using coremltools==2.1.
You can install it from PyPi, with a simple pip install coremltools==2.1
and this should fix your error.
Please feel free to reopen this issue if you're still having trouble!
@vinitra pip installing any coremltools version besides 4.* returns a "No matching distribution found". It seems that Apple has removed older versions of coremltools from PyPi.
Please reopen the issue
I'm having the same issue
Describe the bug
I'm following the caffe to onnx tutorial at https://github.com/onnx/onnx-docker/blob/master/onnx-ecosystem/converter_scripts/caffe_coreml_onnx.ipynb and I encounter this error: ImportError: cannot import name 'libcaffeconverter' from 'coremltools'
On further investigation, I realized that there is no libcaffeconverter in the coremltools directory.
This issue is the same as apple/coremltools#773 however the solution there didn't work for me and another user. And that issue didn't seem to be getting any attention hence making a new issue here. System information
Reproduction instructions
create a NEW environment and run "pip install coremltools==4.0b3"
run
in python interpreter run the code at https://github.com/onnx/onnx-docker/blob/master/onnx-ecosystem/converter_scripts/caffe_coreml_onnx.ipynb
OR
Run:
import coremltools coremltools.converters.caffe.convert(None)
Expected behavior
I expected the code to create and save a an onnx file based on the caffe file specified in the code