-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fix message error in distributed circuit #543
Conversation
Apparently tests are failing due to an import error from tensorflow. I don't really know why this happens. |
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 for the fix, I also saw it a few days ago and wanted to fix it.
Apparently tests are failing due to an import error from tensorflow. I don't really know why this happens.
I also noticed this while working on #542. I am not sure why it happens, perhaps the latest release of tensorflow has an issue with windows?!
An easy solution I could think of was to add E0401 in the pylint exceptions for all lines that cause the issue (see for example here). I think CI was passing after. Not sure if that's what we should do though.
Btw, the qgan tests fail on my machine when using GPU for some time now but this is not related to the CI issue. I thought it had something to do with my tensorflow installation.
Codecov Report
@@ Coverage Diff @@
## master #543 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 84 84
Lines 12422 12417 -5
=========================================
- Hits 12422 12417 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I think that this PR is ready to merge. I had to disable a few tests with distributed circuit, which are available only on GPU, in order to have 100% coverage. Let me know what you think. |
src/qibo/models/circuit.py
Outdated
@@ -72,7 +72,7 @@ def QFT(nqubits: int, with_swaps: bool = True, | |||
return circuit | |||
|
|||
|
|||
def _DistributedQFT(nqubits, accelerators=None): | |||
def _DistributedQFT(nqubits, accelerators=None): # pragma: no cover |
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 for the updates. In principle this method and the one in test_circuit_constructor
should be tested virtually on CPU with qibotf. If it is not, there may be something strange going on. I am checking in another branch if coverage will pass without these exceptions.
Remove some coverage exceptions
Thanks looks good. |
In this PR I fixed the error message for the distributed circuit according to the renaming of the backends implemented in #533. The error shown now in the case of cuquantum is the following
The same mechanism is applied when using the numba backend.