-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Regenerate plot_gate_map_reference images #6087
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Matplotlib 3.4.0 was released earlier today, March 26 2021 since its release CI jobs have been failing on the plot_gate_map visualization tests. This is because the reference image used to compare the output of the plot_gate_map() function has subtlely changed when run with this new release (which our CI system pulled in) causing the test to fail an image comparison. This commit fixes the failure in CI by just taking the output image from a failed run with matplotlib 3.4.0 locally and replacing the reference image with this new version.
mtreinish
requested review from
nkanazawa1989,
nonhermitian and
a team
as code owners
March 26, 2021 11:16
mtreinish
added
priority: high
type: qa
Issues and PRs that relate to testing and code quality
labels
Mar 26, 2021
kdk
previously approved these changes
Mar 26, 2021
Merged
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Mar 26, 2021
PR Qiskit#6087 attempted to fix CI by fixing compatibility with the recent matplotlib release 3.4.0. However to fix the deprecated API usage we need new features from matplotlib 3.4.0 which would break compatibility for users on older matplotlib (as our tutorials job caught since it pins mpl to avoid a performance regression). As an alternative to that this commit just pins matplotlib in CI so we do not install the version emitting deprecation warnings. This means that users will see deprecation warnings when they use some function (mainly qsphere and bloch sphere), but until we're ready to raise our minimum supported matplotlib version to 3.4.0 that is unavoidable.
This is superseded by #6090. We can't fix the deprecation warnings without bumping our minimum supported mpl version to 3.4.0 as the tutorials job showed us. That PR works around the CI failures by just pinning in CI, at some point we'll need this change, but we can't merge it until we're ready to say we only support |
mergify bot
pushed a commit
that referenced
this pull request
Mar 26, 2021
PR #6087 attempted to fix CI by fixing compatibility with the recent matplotlib release 3.4.0. However to fix the deprecated API usage we need new features from matplotlib 3.4.0 which would break compatibility for users on older matplotlib (as our tutorials job caught since it pins mpl to avoid a performance regression). As an alternative to that this commit just pins matplotlib in CI so we do not install the version emitting deprecation warnings. This means that users will see deprecation warnings when they use some function (mainly qsphere and bloch sphere), but until we're ready to raise our minimum supported matplotlib version to 3.4.0 that is unavoidable.
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Oct 25, 2021
In matplotlib 3.4.0 released on 03/26/2021 there were some deprecations around our use of Axes3d in the state visualization and bloch sphere modules. Fixing our usage to avoid these deprecations was previously attempted in Qiskit#6136 and Qiskit#6087 but we did not move forward there because the supported API we need to use matplotlib 3.3.0 when it was introduced. We previously did not want to raise our minimum supported matplotlib version to 3.3.0 to accomodate this. However, recent changes in transitive dependency of mpl, pyparsing, caused an incompatibility when running with older mpl versions around mathtex. To fix that we had to pin pyparsing in the constraints file (see Qiskit#7174). It appears that now is a better time to raise our minimum version because the burden of trying to keep support for older matplotlib versions is higher than it once was. This commit bumps the minimum matplotlib version to 3.3.0, updates the usage of Axes3d to avoid the deprecated usage in matplotlib 3.4.0, and removes the contraints pinning introduced in Qiskit#7174. This should get us on supported releases for matplotlib moving forward and it'll hopefully be a while before we encounter this kind of version issue in the future. Fixes Qiskit#6136
mergify bot
added a commit
that referenced
this pull request
Oct 28, 2021
* Bump minimum matplotlib version to 3.3.0 In matplotlib 3.4.0 released on 03/26/2021 there were some deprecations around our use of Axes3d in the state visualization and bloch sphere modules. Fixing our usage to avoid these deprecations was previously attempted in #6136 and #6087 but we did not move forward there because the supported API we need to use matplotlib 3.3.0 when it was introduced. We previously did not want to raise our minimum supported matplotlib version to 3.3.0 to accomodate this. However, recent changes in transitive dependency of mpl, pyparsing, caused an incompatibility when running with older mpl versions around mathtex. To fix that we had to pin pyparsing in the constraints file (see #7174). It appears that now is a better time to raise our minimum version because the burden of trying to keep support for older matplotlib versions is higher than it once was. This commit bumps the minimum matplotlib version to 3.3.0, updates the usage of Axes3d to avoid the deprecated usage in matplotlib 3.4.0, and removes the contraints pinning introduced in #7174. This should get us on supported releases for matplotlib moving forward and it'll hopefully be a while before we encounter this kind of version issue in the future. Fixes #6136 * Run black * Restore constraints pinning I was under the mistaken impression that the current mpl releases were compatible with pyparsing3, but looking at the linked mpl issue it's not fixed yet only for their development so far. So to unblock CI this restores the pinning as it's still needed until mpl releases a fix. * Fix matplotlib 3.3.x compat * Fix version string comparison typing * Fix typo * Fix second `ax` typo * Fix gatemap tests with newer matplotlib * Fix lint Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Matplotlib 3.4.0 was released earlier today, March 26 2021 since its
release CI jobs have been failing on the plot_gate_map visualization
tests. This is because the reference image used to compare the output of
the plot_gate_map() function has subtlely changed when run with this new
release (which our CI system pulled in) causing the test to fail an
image comparison. This commit fixes the failure in CI by just taking the
output image from a failed run with matplotlib 3.4.0 locally and
replacing the reference image with this new version.
Details and comments