Skip to content
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

Merged
merged 9 commits into from
Feb 10, 2022
Merged

Fix message error in distributed circuit #543

merged 9 commits into from
Feb 10, 2022

Conversation

andrea-pasquale
Copy link
Contributor

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

NotImplementedError: Distributed circuit is not supported by the qibojit (cuquantum) backend.

The same mechanism is applied when using the numba backend.

@andrea-pasquale
Copy link
Contributor Author

Apparently tests are failing due to an import error from tensorflow. I don't really know why this happens.

Copy link
Member

@stavros11 stavros11 left a 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
Copy link

codecov bot commented Feb 8, 2022

Codecov Report

Merging #543 (dee57e9) into master (790c18e) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #543   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           84        84           
  Lines        12422     12417    -5     
=========================================
- Hits         12422     12417    -5     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/qibo/backends/numpy.py 100.00% <ø> (ø)
src/qibo/core/distcircuit.py 100.00% <ø> (ø)
src/qibo/models/qgan.py 100.00% <100.00%> (ø)
src/qibo/tests/test_models_circuit.py 100.00% <100.00%> (ø)
src/qibo/tests/test_models_qgan.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 790c18e...dee57e9. Read the comment docs.

@andrea-pasquale
Copy link
Contributor Author

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.

@@ -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
Copy link
Member

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
@scarrazza
Copy link
Member

Thanks looks good.

@scarrazza scarrazza merged commit 093a32b into master Feb 10, 2022
@scarrazza scarrazza deleted the fixerrormsg branch February 11, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants