fix: Add Python 3.12 compatibility - #334
Conversation
2845823 to
b5399a7
Compare
|
Hi @Raakshass, thanks for pushing this update! I’ve pulled the branch ( While the environment setup is cleaner, I hit two specific blockers that prevent a full successful run on Python 3.12. Dependency Pinning (
Runtime Model Compatibility (
I am happy to keep testing iterations of this branch as we fix these! Let me know if you need any more logs from my side. |
5c52ba9 to
0d788ff
Compare
|
hi @peterdudfield 👋 i'm working on python 3.12 compatibility (issue #333) and have hit a blocker with CI. what i've done:
the problem: could you please approve the workflow run so we can see if my fix passes ci? also, @astropedrocosta pointed out two additional blockers:
these may need to be separate follow-up issues. happy to help with any of them! |
|
Hey @Raakshass, thanks for the update! I am actively working on the model re-exporting and the Python 3.12 runtime compatibility right now. I have a local fix in progress and I plan to open a separate PR for those specific changes tomorrow. Regarding the I agree that keeping this PR focused on the build/dependency setup (Issue #333) is the best approach. It keeps things clean. Good luck with the workflow approval! |
|
Hi @astropedrocosta, thank you for this incredibly thorough testing report! 🙏 I really appreciate you pulling the branch and validating on macOS with Python 3.12. Regarding the two blockers: 1. pv-site-prediction wheel issue: 2. Model deserialization with scikit-learn 1.5+: I'm working on getting the workflow approved. Will push updates for the Thanks again for your testing and feedback - this collaboration is really helpful. |
|
The CI is showing failures but they're from the The issue is that Could you please:
Once main is fixed, this PR's CI will pass! Thanks! |
|
Hi @peterdudfield! No, it's ready to merge! The CI failures are from the Once PR #340 is merged into main, the Ready for merge whenever you are! Thanks for the approval |
|
Hi @peterdudfield — thanks for the approval! The CI failure is from the Could you either merge #340 into main first to fix the lint, or merge this PR directly? Both will resolve the CI. Thanks! |
- Update requires-python to >=3.11,<3.13 to explicitly support Python 3.12 - Update huggingface_hub from 0.17.3 to 0.21.4 for Py3.12 compatibility - Disable HuggingfaceHubIntegration in sentry_sdk to fix version conflicts Fixes openclimatefix#333
cb3f885 to
30ac487
Compare
Move pv-site-prediction to [legacy] dependency group since it requires fsspec<2023.0.0 which conflicts with huggingface-hub>=0.20.0 (needs fsspec>=2023.5.0). The package also requires Python <3.12. Changes: - pyproject.toml: move pv-site-prediction to optional 'legacy' group - forecasts/__init__.py: lazy-import v1 models with try/except - forecast.py: guard for missing forecast_v1_tilt_orientation - eval/forecast.py: guard for missing psp imports
Pull Request
Description
This PR updates the project configuration to explicitly support Python 3.12 and resolves dependency conflicts.
Specifically, it:
requires-pythonto>=3.11,<3.13to officially permit Python 3.12.huggingface_hubfrom pinned0.17.3to>=0.20.0to ensure compatibility with Python 3.12 environments.Fixes #333
How Has This Been Tested?
I have verified that the dependencies resolve correctly in a Python 3.12 environment with these changes. I am currently coordinating with the issue reporter to validate the full forecast run on their setup.
Checklist: