-
Notifications
You must be signed in to change notification settings - Fork 61
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.12 #1231
Support Python 3.12 #1231
Conversation
@natestemen this branch could work (in principle), and we've been kind of lucky: TensorFlow didn't support py3.12 until 5 days ago, when they published a release candidate with initial support (not yet a stable one). I wonder whether it's this the triggered your update. I still have to solve part of the problem with the installation, but the dependencies should now be alright. |
@scarrazza is it acceptable to have a TensorFlow release candidate dep in |
Assuming that tests are passing, the plan is the following:
|
Tests are failing because I'll try to circumvent the issue, but I'd recommend replacing it, if possible. |
Required for unitaryfund/mitiq#2066 |
Currently stuck because of TensorFlow installation. |
Tests are passing, even though not doctests. The reason is that if Lines 31 to 41 in aa0fab2
|
Thanks @alecandido. This is expected, I think tests (not doctests) were set up so that they only run on backends that are available, mostly for convenience when running them locally in an environment with a subset of backends installed. However, I do not understand why tensorflow is not installed in the CI, since we still have it in the pyproject? If tensorflow is the only issue blocking this I would consider disabling the related doctests temporarily and opening an issue until tensorflow is "officially" relased for py3.12. That also depends on what release we would like to include this. If I remember correctly is not for the one coming soon so maybe we could even keep on hold. The main motivation is that it is needed by an external project, though. |
This is an issue with the release candidate package, most likely. That's why this PR is on hold, waiting for a more stable support for py3.12 from TensorFlow (or to make TensorFlow optional, e.g. outsourcing to |
It's not too urgent, apparently, let's keep going with |
Thank you for so much effort after I pinged y'all! Just want to say it's not super urgent on our side. |
Thanks for the update @natestemen! I also checked the various common distributions, and no major one is shipping py3.12 as default Python yet. In any case, we'll work on reducing the default dependencies later on, to make upgrades easier in general. For the time being, as soon as TF will be unlocked, we'll complete this PR. |
I'll now make the package! |
Ok, now the situation is even more complicated, since the same problem of QiboJIT is now present for QiboTN as well. I will move forward with this PR, and the matching ones If tests are passing, we can merge. But we should try to push for |
@BrunoLiegiBastonLiegi @renatomello, there is a Clifford test failing at random: (as I wrote somewhere else, I expect that is because you're testing with random values, without fixing a seed - so tests are not reproducible; if you want fuzzying, consider using https://hypothesis.readthedocs.io/en/latest/ instead) |
And we have a problem with Funnily, the problem is on Linux, but not on Windows. |
The fix is in #1202 |
In order to avoid the explicit CVXPY dependency
This time to avoid using tf.keras
I.e. remove explicit python version from nix, and remove the mention of CVXPY in qinfo extra, since the dependency is not there any longer
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1231 +/- ##
==========================================
- Coverage 99.84% 99.83% -0.01%
==========================================
Files 73 72 -1
Lines 10693 10484 -209
==========================================
- Hits 10676 10467 -209
Misses 17 17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Ok, we just got the first Codecov report for this PR, since it's now passing on Ubuntu (still to be verified on Mac). In the last commit we have been hit by the cache again*, but it should work in a while. @stavros11 @scarrazza if you can take a look, and confirm that we're willing to accept the changes, we could merge as soon as the workflows will be passing. *@scarrazza if you want a report with the cache error, here it is: |
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 @alecandido. Other than the comments below, it looks good to me.
qibojit = { git = "https://github.com/qiboteam/qibojit.git", branch = "py3.12" } | ||
qibotn = { git = "https://github.com/qiboteam/qibotn.git", branch = "py3.12" } |
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.
I guess these will be reverted to main
later following #1231 (comment). Shall we open an issue before merging this or will we do immediately?
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.
Not sure: unfortunately, that procedure should be followed from every incompatible update, so it could be worth an issue (at least for this time, but even to remember).
However, I'm working in parallel on qibo-core
. If I'll manage to have something reasonable soon enough, we might not need anything like this any longer.
@@ -544,22 +546,20 @@ def diamond_norm(channel, target=None, backend=None, **kwargs): | |||
If a ``target`` channel :math:`\\Lambda` is specified, | |||
then it calculates :math:`\\| \\mathcal{E} - \\Lambda\\|_{\\diamond}`. | |||
|
|||
Example: | |||
Example:: |
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.
Example:: | |
Example: |
(is the double ::
actually needed?)
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.
The ::
is an alias for code-block:: <default-language>
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#literal-blocks
Co-authored-by: Stavros Efthymiou <[email protected]>
No description provided.