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

upgrade python version #228

Open
keighrim opened this issue Jun 9, 2024 · 2 comments
Open

upgrade python version #228

keighrim opened this issue Jun 9, 2024 · 2 comments
Labels
✨N New feature or request

Comments

@keighrim
Copy link
Member

keighrim commented Jun 9, 2024

New Feature Summary

ATM, clams SDK's are based on py 3.8, but the version is reaching the end of support very soon. We'd like to migrate to a stable python version before it's too late.

I'm divided between 3.10 and 3.12, but more leaning toward 3.10 to support older (but still very well supported) linux distros that do not ship the upstream versions. For example,

Related

No response

Alternatives

No response

Additional context

python support status https://devguide.python.org/versions/

@mrharpo
Copy link
Member

mrharpo commented Aug 29, 2024

Is it possible (or worth the effort) to support multiple versions of python at once?

I agree with @keighrim about preferring 3.10 for compatibility, but there's also a substantial speedup when running 3.12, some say as much as 2x for certain tasks. We probably won't get those results in general, especially if the computation if limited by the models.

But for a quick comparable example, I just ran a test with (vanilla) Whisper on GPU, where 3.12 ran about 5% faster than 3.10, with no other changes on the system.

To me, that's a "worth the effort" sort of improvement considering the amount of processing we intend to do.

@keighrim
Copy link
Member Author

In theory, any code written for python 3.x will run on python 3.y as long as y >= x, because python3 versions are supposed to be backward compatible. The only (I can think of now) major "breaking" scenario of running an app written for 3.x on python 3.y is the app having a "strictly pinned" dependency that doesn't pip-install on 3.y (but still installs on 3.x). Thus, in practice, as long as app devs avoid strict pins (or upper-caps) - which I believe a better practice in general anyway, under the current python eco-system - we won't have to add extra work to support 3.12.

That being said, the SDK itself is not an exception from the issue of upper-bound dependency, and in fact this clams-python has one (https://github.com/clamsproject/clams-python/blob/453b4a7a6a1517f193cb3ce956526884d504d2e8/requirements.txt). So maybe adding more test envs with all future python versions in the CI pipeline might be a good idea, to make sure the SDK run on all python>=3.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨N New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants