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 unit test that is breaking CI #672

Merged
merged 2 commits into from
Aug 16, 2023
Merged

Conversation

woodsp-ibm
Copy link
Member

@woodsp-ibm woodsp-ibm commented Aug 14, 2023

Summary

CI has been failing nightly builds for a while. The error is

File "/Users/runner/work/qiskit-machine-learning/qiskit-machine-learning/test/neural_networks/test_circuit_qnn.py", line 27, in <module>
    from qiskit.compiler.transpiler import PassManagerConfig, level_1_pass_manager, level_2_pass_manager
ImportError: cannot import name 'PassManagerConfig' from 'qiskit.compiler.transpiler' 

The transpiler.py file changed in the last release of Qiskit and no longer imports the above. The test should not have been importing them via compiler.transpiler.py (which is what it was doing) rather it should have been importing them the same way that file imported them. This changes the test case to do just that so CI should now run again (tests pass locally for me now)

I did not notice the tutorials here were failing too. I added the same workaround as we had in the other apps which gets the python3 kernel installed.

Details and comments

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5859929668

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.915%

Totals Coverage Status
Change from base Build 5331720900: 0.0%
Covered Lines: 2649
Relevant Lines: 2851

💛 - Coveralls

@woodsp-ibm woodsp-ibm added stable backport potential The bug might be minimal and/or import enough to be port to stable automerge labels Aug 16, 2023
@mergify mergify bot merged commit 583e5ef into qiskit-community:main Aug 16, 2023
15 of 16 checks passed
mergify bot pushed a commit that referenced this pull request Aug 16, 2023
* Fix unit test that is breaking CI

* Workaround no such kernel python3

(cherry picked from commit 583e5ef)
@woodsp-ibm woodsp-ibm deleted the fix_CI branch August 16, 2023 14:47
woodsp-ibm added a commit that referenced this pull request Aug 16, 2023
* Fix unit test that is breaking CI (#672)

* Fix unit test that is breaking CI

* Workaround no such kernel python3

(cherry picked from commit 583e5ef)

* Update test_circuit_qnn.py

Fix date

---------

Co-authored-by: Steve Wood <[email protected]>
oscar-wallis pushed a commit that referenced this pull request Feb 16, 2024
* Fix unit test that is breaking CI

* Workaround no such kernel python3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants