Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with NumPy 2.0... #233

Open
chadacious opened this issue Jun 16, 2024 · 3 comments
Open

Incompatible with NumPy 2.0... #233

chadacious opened this issue Jun 16, 2024 · 3 comments

Comments

@chadacious
Copy link

Attempting to run this after install I get:

File "/Users/chad/Library/Application Support/pipx/venvs/insanely-fast-whisper/lib/python3.12/site-packages/pyannote/audio/core/inference.py", line 529, in Inference
    missing: float = np.NaN,
                     ^^^^^^
  File "/Users/chad/Library/Application Support/pipx/venvs/insanely-fast-whisper/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.NaN` was removed in the NumPy 2.0 release. Use `np.nan` instead.. Did you mean: 'nan'?

Still looking into if downgrading NumPy will resolve the issue.

@Amandrs
Copy link

Amandrs commented Jun 18, 2024

Change line to

missing: float = np.nan,

and this will work

@jacobpretorius
Copy link

jacobpretorius commented Jun 18, 2024

Change line to

missing: float = np.nan,

and this will work

Doing that gives the next error

C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\nested\_internal\nested_tensor.py:417: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:84.)

This is with the latest version of the package 0.0.15.

Downgrading numpy worked for me (keeping the original np.NaN as is)

pip uninstall numpy
pip install numpy==1.26.3

@putssander
Copy link

putssander commented Jun 19, 2024

Using pipx, I successfully downgraded numpy with the following command from my notebook:
!pipx inject insanely-fast-whisper numpy==1.26.4 --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants