ggerganov / whisper.cpp

Port of OpenAI's Whisper model in C/C++
MIT License
34.25k stars 3.48k forks source link

Core ML support: AttributeError: `np.issctype` was removed in the NumPy 2.0 release. Use `issubclass(rep, np.generic)` instead.. Did you mean: 'isdtype'? #2257

Open BastLeblanc opened 2 months ago

BastLeblanc commented 2 months ago

trying to install the Core ML support on a macbook pro m3

running

./models/generate-coreml-model.sh base.en
Torch version 2.3.1 has not been tested with coremltools. You may run into unexpected errors. Torch 2.2.0 is the most recent version that has been tested.
Failed to load _MLModelProxy: No module named 'coremltools.libcoremlpython'
Fail to import BlobReader from libmilstoragepython. No module named 'coremltools.libmilstoragepython'
Fail to import BlobWriter from libmilstoragepython. No module named 'coremltools.libmilstoragepython'
ModelDimensions(n_mels=80, n_audio_ctx=1500, n_audio_state=512, n_audio_head=8, n_audio_layer=6, n_vocab=51864, n_text_ctx=448, n_text_state=512, n_text_head=8, n_text_layer=6)
[...]
AttributeError: `np.issctype` was removed in the NumPy 2.0 release. Use `issubclass(rep, np.generic)` instead.. Did you mean: 'isdtype'?
BastLeblanc commented 2 months ago

fixes for me was:

Maybe you should have a requirements.txt ?

chbrown commented 4 days ago

Fwiw the following got me going when I hit the same suite of problems:

# (brew install uv)
uv venv --python python3.10
source .venv/bin/activate
uv pip install ane-transformers openai-whisper coremltools==6.3.0 'numpy<2'
# (./models/generate-coreml-model.sh etc.)