-
Notifications
You must be signed in to change notification settings - Fork 62
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
Support Python 3.13 #1484
base: master
Are you sure you want to change the base?
Support Python 3.13 #1484
Conversation
The CI is of course failing, since I had to disable |
Ciao @alecandido, any update on this? Qibo is one dependency that is blocking Mitiq to support Python 3.13. |
@cosenal thanks for reaching about this, we're now in a better situation than last time (i.e. #1231), but still not optimal. Let me explain. Before Qibo was locked behind TensorFlow, which was still the case in October, when I opened this PR. What happened in the last few months is the final migration of the differentiable computation support of Qibo to Qiboml https://github.com/qiboteam/qiboml. Unfortunately, we're still in a situation in which part of the backends are tested in Qibo's CI, thus we should still follow the update procedure outlined in #1231 (comment) Thus, the current issue is that Qiboml will be needed to test the TensorFlow backend in the Qibo CI, right now failing for its absence (actually, first encountering Qibojit's absence, but that can be solved with the above procedure). If the dependency were reinstated, then it would fail because of Qiboml not supporting Python 3.13 - eventually coming back to TensorFlow once more. So, the original issue is not completely solved, but we're now much closer, since we only have to choose how to handle the test issue, introducing the dependency, and then TensorFlow would be out of the main loop (unless Mitiq explicitly targets the TensorFlow backend - at which point Qibo can't solve the issue, until TensorFlow itself will). |
328f5e9
to
6bf8f3e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## numpy_2.0 #1484 +/- ##
==========================================
Coverage 99.06% 99.06%
==========================================
Files 76 76
Lines 11322 11322
==========================================
Hits 11216 11216
Misses 106 106
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
@alecandido maybe it is worth adding a no cover
tag to the _sgd_tf
function
To be fair, having a |
f97cd69
to
0cabce6
Compare
9343131
to
dd83da0
Compare
d8085d5
to
d90bdd5
Compare
It has been necessary to reduce deps and their version range, in order to be reduce the complexity of constraints resolution. In any case, all the version ranges have been restricted to compatible ones, and all the deps dropped are apparently unused in the code. Now, it locks in less than 10s
To any willing reviewer: most of the comments written above have already been applied in #1582 (Cirq, Qiboml, Qibotn, ...), thus they are already in https://github.com/qiboteam/qibo/tree/master. This PR is now just updating the dependencies and workflows (and fixing very few linters complaints). |
Since py3.13 has been finally published (on Monday), I tried out of curiosity whether it was possible to upgrade our version constraint to use that.
We do not directly rely on Python internals, and py3.x versions are backward compatible (in principle). So, there is no reason for Qibo not to support it, for as long as our dependencies support that.
So, it was just a matter of running
poetry lock
, and... it seems working.Now, we still need to solve the Qibojit problem (that in the meanwhile became also a Qibotn one, and soon Qiboml as well).
I expected this to be blocked by TensorFlow once again. And it should, since they are not distributing wheels for py3.13 yet (and they apparently won't before next year tensorflow/tensorflow#62003 (comment)), but apparently they didn't care declaring it
https://github.com/tensorflow/tensorflow/blob/a2fadc33162b16989eb10a541d112e6b9fffa0e1/tensorflow/tools/pip_package/setup.py#L412
and Poetry is not examining the wheel compatibility, so we already got a valid lockfile anyhow.
While going through Qibojit and the rest of it (following the much beloved procedure in #1231 (comment)) further problems may arise. But, at this point, I will have a try soon, also to track the present blockers.