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

Release a patched version to PyPI for NumPy compatibility #366

Closed
carlthome opened this issue Nov 15, 2023 · 3 comments
Closed

Release a patched version to PyPI for NumPy compatibility #366

carlthome opened this issue Nov 15, 2023 · 3 comments
Milestone

Comments

@carlthome
Copy link
Contributor

Noticed that people have started employing the work around of upper bounding NumPy in their usage of mir_eval now (example) which tells me that it's high time to make a new release.

What steps are remaining to take to make mir_eval compatible with the latest NumPy again?

IIRC it's only a matter of running the GitHub Actions release workflow after bumping the version number in the code but I'm also not fully aware of relevant changes since 0.7 was built, so is it an incoming 0.8 or 0.7.1?

Something I could help with to expedite this? I'm available to help.

@bmcfee
Copy link
Collaborator

bmcfee commented Nov 15, 2023

What steps are remaining to take to make mir_eval compatible with the latest NumPy again?

AFAIK it's really just down to replacing uses of deprecated dtype aliases (np.complex, np.float) for python builtins (complex, float). And of course, updating our CI environments to make sure that it's all tested appropriately.

@bmcfee bmcfee added this to the 0.8 milestone Mar 13, 2024
@lzqlzzq
Copy link

lzqlzzq commented Sep 14, 2024

When I use mir_eval.chord.encode, I got:

  File "/home/lzq/anaconda3/lib/python3.12/site-packages/mir_eval/chord.py", line 513, in encode
    semitone_bitmap = (semitone_bitmap > 0).astype(np.int)
                                                   ^^^^^^
  File "/home/lzq/anaconda3/lib/python3.12/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?

It' s an unfortunate limitation that mir_eval is only compatiable with numpy<=1.20.

@bmcfee
Copy link
Collaborator

bmcfee commented Feb 6, 2025

Release candidate 1 is now up. Barring any major problems, I'll cut a final release within the next couple of days.

@bmcfee bmcfee closed this as completed Feb 6, 2025
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

3 participants