coremltools: Wrong numpy range in setup.py
🐞Describe the bug
The setup.py for coremltools specifies the numpy dependency range as 'numpy >= 1.14.5'
. However using any version before then 1.16.0
causes a segmentation fault. Any version >= to 1.16.0
works.
It would be nice to support versions before 1.16.0
. That version is less than a year old. However at the very least the specified dependency ranges should be accurate.
Trace
No trace displayed. Only output is Segmentation fault: 11
To Reproduce
In a fresh/new Conda environment, run:
pip install Pillow coremltools==3.0b6 numpy==1.15.4
Download the MNIST Model.
Execute the following code:
import coremltools
from PIL import Image
import numpy as np
data = np.empty((28,28), dtype=np.uint8)
input_image = Image.fromarray(data)
model = coremltools.models.MLModel('./Downloads/MNISTClassifier.mlmodel')
print(model.predict({'image': input_image}))
This give a segmentation fault.
If you then run pip install numpy==1.16.0
, then the above code works.
System environment (please complete the following information):
- coremltools version (e.g., 3.0b5): 3.0b6
- OS (e.g., MacOS, Linux): MacOS
- macOS version (if applicable): 10.14.6
- XCode version (if applicable): Not using
- How you install python (anaconda, virtualenv, system): anaconda
- python version (e.g. 3.7): 3.6
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 17
Commits related to this issue
- adding more typehints to DDIM scheduler (#456) * adding more typehints * resolving mypy issues * resolving formatting issue * fixing isort issue Co-authored-by: V Vishnu Anirudh <git.vva@... — committed to Birch-san/coremltools by vishnu-anirudh 2 years ago
- Revert "adding more typehints to DDIM scheduler" (#533) Revert "adding more typehints to DDIM scheduler (#456)" This reverts commit a0558b11465d446ce0b5d0e6e9c632b33ea7a542. — committed to Birch-san/coremltools by patrickvonplaten 2 years ago
Installing the oldest version of numpy we want to support, before running
cmake
andmake
, solves this issue.Oh! Thanks for letting me know this. I have upgraded the system and it is completed now.
I installed the codemltool using pip not through source but I came across different error messege :
Can you please help me to resolve this? Thanks!