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

Run unittests on Python 3.12 #27

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mweinelt
Copy link
Contributor

  • Test pytorch stable and nightly
  • Use uv's pip interface for faster dependency resolution
  • Migrate away from deprecated py.test executable
  • Convert various options to long-opts, makes them easier to understand

@mweinelt mweinelt force-pushed the tests branch 4 times, most recently from 8d646d6 to 53b428b Compare January 12, 2025 18:46
Copy link
Contributor

@mpariente mpariente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general, thanks !

What's the advantage of UV, please ?

matrix:
python-version: [3.6] #, 3.7, 3.8]
pytorch-version: ["1.8.0", "nightly"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One version of Python only to save some compute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, trying to figure out what versions actually work. Then I'll reduce the scope to one of those.

Copy link
Contributor Author

@mweinelt mweinelt Jan 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.12 seems to be the latest version that works, so I chose that.

The full test matrix takes 1m20s fwiw, which is probably fine.

.github/workflows/test_package.yml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@mweinelt mweinelt force-pushed the tests branch 3 times, most recently from 75a08cc to eb675fa Compare January 12, 2025 18:54
@mweinelt
Copy link
Contributor Author

mweinelt commented Jan 12, 2025

What's the advantage of UV, please ?

Pip compatible interface but 10-100x faster, thus saving on compute and giving faster response times.

@mweinelt mweinelt force-pushed the tests branch 5 times, most recently from 67a310a to 17d4cb4 Compare January 12, 2025 19:14
- Test pytorch stable and nightly
- Use uv's pip interface for faster dependency resolution
- Migrate away from deprecated `py.test` executable
- Convert various options to long-opts, makes them easier to understand
This is required for using uv I'm afraid, but the changes should increase
the QoL of the life, since we can rely on a no-code approach to define
the package.

This is based on https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
@mweinelt
Copy link
Contributor Author

mweinelt commented Jan 12, 2025

Okay. Looks like tests to 2.5.1 are running on 3.9-3.12. The nightly torch tests fail during dependency resolution, because for some reason they want to include llvmlite==0.36.0 (via librosa, which has no upper bound), which does not support Python 3.10+.

Time for dinner.

Running on just one version was requested, as to reduce the compute we
consume through the CI.
@mweinelt
Copy link
Contributor Author

I had to pin to a newer numba version, to get a llvmlite version compatible with 3.10 and newer.

Now all versions 3.9-3.12 are working with torch 2.5.1 and nightly.

The test_torch_stft test however seems broken with torch==2.5.1.

@mweinelt mweinelt changed the title Enable test matrix for Python 3.9 to 3.13 Run unittests on Python 3.12 Jan 12, 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

Successfully merging this pull request may close these issues.

2 participants