thinc icon indicating copy to clipboard operation
thinc copied to clipboard

[BUG] -- `numpy` 2.0.0 raises `ValueError` in `thinc.backends.numpy_ops`

Open it176131 opened this issue 8 months ago • 7 comments

How to reproduce the behaviour

Using Python 3.12.2 on a Windows 10 machine:

$ py -3.12 -m venv env $ source env/Scripts/activate $ pip install thinc -U $ python -c "from thinc.backends.numpy_ops import NumpyOps"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\test\env\Lib\site-packages\thinc\backends\__init__.py", line 17, in <module>
    from .cupy_ops import CupyOps
  File "C:\Users\user\test\env\Lib\site-packages\thinc\backends\cupy_ops.py", line 16, in <module>
    from .numpy_ops import NumpyOps
  File "thinc\backends\numpy_ops.pyx", line 1, in init thinc.backends.numpy_ops
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Your Environment

  • Operating System: Windows 10
  • Python Version Used: 3.12.2
  • Thinc Version Used: 9.0.0
  • Environment Information:
Package           Version
----------------- -------
annotated-types   0.7.0
blis              0.7.11
catalogue         2.0.10
colorama          0.4.6
confection        0.1.5
cymem             2.0.8
murmurhash        1.0.10
numpy             2.0.0
packaging         24.1
pip               24.0
preshed           3.0.9
pydantic          2.7.4
pydantic_core     2.18.4
setuptools        70.0.0
srsly             2.4.8
thinc             9.0.0
typing_extensions 4.12.2
wasabi            1.1.3

it176131 avatar Jun 17 '24 17:06 it176131