-
-
Notifications
You must be signed in to change notification settings - Fork 553
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 to newest versions of jax
+ jaxlib
and add Windows support for JAX Solver
#3550
Upgrade to newest versions of jax
+ jaxlib
and add Windows support for JAX Solver
#3550
Conversation
1. Add support for Python 3.11 on aarch64 containers 2. Keep Python 3.8 support on older version 3. Add Python 3.9–3.11 support on newer version (same as the one for point 1) 4. Add support for CPU-only Windows installation 5. Pin all versions so as to not break anything.
tested with `--upgrade` and `--upgrade-strategy eager` plus `--no-cache-dir`
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3550 +/- ##
========================================
Coverage 99.58% 99.58%
========================================
Files 257 257
Lines 20708 20708
========================================
Hits 20623 20623
Misses 85 85 ☔ View full report in Codecov by Sentry. |
It looks like I misread the The way around this is to either drop Python 3.8 support (big breaking change) or provide Windows Jax support for just Python 3.9–3.11 (more reasonable change) similar to how As I had mentioned, I did start working on rewriting the installation guide side-by-side; however, it shall shift almost all of the pages and their links and would be better as a separate PR. It may be merged in a follow-up queue shortly after the completion of this PR. P.S. Stepping a bit aside from relevant discussion pertaining to the changes here, but @Saransh-cpp previously mentioned https://scientific-python.org/specs/spec-0000/, which suggested dropping Python 3.9 support by the end of the year since its support window has now ended. While we may not want to do that yet, dropping Python 3.8 could be a reasonable idea since 1. all our core dependencies have done so now with |
Co-authored-by: Eric G. Kratz <[email protected]>
Co-authored-by: Eric G. Kratz <[email protected]>
My 2 cents on dropping 3.8/3.9 is that any change like this will break python environments for some people. Probably better to do both at once than drop one, wait then drop the other. Probably less painful to get it done all at once for users with old versions. |
Ah I see, are you suggesting we should drop both 3.8 and 3.9? I don't think that would be a good idea since not all of our dependencies will be ready for Python 3.12. That would leave developers and users with less leeway to work between different Python versions, since supporting just 3.10 and 3.11 would be too little and cramped a space for a Python package like PyBaMM that is also useful as a library. Python 3.8 support had closed a long time back and its EOL is less than a year away (October 2024) which is usually the recommended time for dropping support, but the Scientific Python ecosystem moves quicker and has its own, steadfast ways of proceeding with such things. While Python 3.9 also has a closed support window now, we have two years to reach EOL for it so the day to remove it from PyBaMM is quite far (not until Q3 2025 as the farthest estimate) if we decide to not follow the aforementioned SPEC 0000 in the releases starting next year. But if we do, it would come much quicker. |
Supporting Jax on Python 3.9+ for Windows sounds like a better option.
I'm not really a big fan of the drop schedule of the Python version listed in SPEC 0000. Most of the libraries I am involved with still support Python 3.8 and will continue until it reaches EOL. I'll ask around and see what the maintainers of other ecosystems think about this, but until then, let's keep supporting Python 3.8. |
and also bump `casadi` build-time dependency minimum version
I have added support for |
Discussion from the developer meeting today: there are some changes in the JAX API between This means we will not be able to support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @agriyakhetarpal! Looks good!
Edit: Is this blocked by the discussion above?
It's not blocked by anyone but me. I have to update the installation guide and restructure it to take into account both this PR and #3531. We can merge this after that – though I will still request some more reviews here as I had mentioned in the meeting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agriyakhetarpal These changes look good to me, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, LGTM!
I have updated the installation guide here for the time being until I work on that in another branch and added an entry to the breaking changes in the CHANGELOG, this should be ready to merge now! I figured that it would be easier to unblock other PRs such as #3531 once this one gets merged. |
Description
Closes #3443. With this PR, I have updated the versions for
jax
andjaxlib
to match the latest version(s) including support for Windows and for retaining support on Python3.8
, which we still support.Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
(or$ nox -s tests
)$ python run-tests.py --doctest
(or$ nox -s doctests
)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick
(or$ nox -s quick
).Further checks: