-
Notifications
You must be signed in to change notification settings - Fork 28.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
[SPARK-37730][PYTHON] Replace use of MPLPlot._add_legend_handle with MPLPlot._append_legend_handles_labels #35000
Conversation
ok to test |
Thanks for taking a look at this, @mslapek. Mind enabling GitHub Actions in your forked repository? (see also https://github.com/apache/spark/pull/35000/checks?check_run_id=4617900123). Apache Spark leverages the GitHub Actions resources from author's forked repository. |
cc @itholic would you mind taking a look please? |
Test build #146523 has finished for PR 35000 at commit
|
I've enabled workflow only for "Build and test". 🤦♂️ Now all workflows should be enabled. |
Kubernetes integration test starting |
Kubernetes integration test status failure |
One hour ago I got result from GitHub action "Report test results": @HyukjinKwon Maybe all actions must be manually requested to rerun? 😕 https://github.com/mslapek/spark/actions/runs/1618397788 |
You can rebase to the latest master branch, or push an empty commit e.g.) git commit --allow-empty |
…els copied from pandas
2a33641
to
0f223f7
Compare
Test build #146564 has finished for PR 35000 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Can one of the admins verify this patch? |
Yeah, I think we can update the pandas version to 1.3.5 in CI, and add related tests. And could you briefly show what you fixed with Before & After example if possible ?? |
we already use latest pandas always. I suspect it's not uploaded to pypi or github actions cannot reach yet if it uses 1.3.5. matplotlib test case is disabled IIRC in CI so that's probably why the tests pass: https://app.codecov.io/gh/apache/spark/blob/master/python/pyspark/pandas/tests/plot/test_series_plot_matplotlib.py |
+1 for #35000 (comment) and #35000 (comment). Otherwise, LGTM 👍 |
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.
LGTM2 except two comments
…dles_labels copied from pandas" This reverts commit 0f223f7.
A brief example is given in the issue: https://issues.apache.org/jira/browse/SPARK-37730 I've run locally matplotlib tests:
After fix (my latest commit a1ca73d):✔️ New pandas
✔️ Old pandas
Main branch before fix (commit c0cedb1):❌ New pandas
✔️ Old pandas
|
Thanks for testing it thoroughly. LGTM |
It seems that CI wants me to reformat file, which I haven't changed: I've merged main branch. |
I manually ran the related tests locally, and verified that it passed. Merged to master. |
@itholic would you mind investigating to enable matplotlib related tests? |
@HyukjinKwon @itholic Thanks for review and help! 😃 |
Thank you, @mslapek, @HyukjinKwon , @itholic .
|
…MPLPlot._append_legend_handles_labels ### What changes were proposed in this pull request? Replace use of MPLPlot._add_legend_handle (removed in pandas) with MPLPlot._append_legend_handles_labels in histogram and KDE plots. Based on: pandas-dev/pandas@029907c ### Why are the changes needed? Fix of SPARK-37730. plot.hist and plot.kde don't throw AttributeError for pandas=1.3.5. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? ~~Tested with existing plot test on CI (for older pandas only).~~ (it seems that CI doesn't run matplotlib tests, see #35000 (comment)) I've run tests on a local computer, see #35000 (comment) : ``` $ python python/pyspark/pandas/tests/plot/test_series_plot_matplotlib.py ``` :question: **QUESTION:** Maybe add plot testing for pandas 1.3.5 on CI? (I've noticed that CI uses `pandas=1.3.4`, maybe update it to `1.3.5`?) Closes #35000 from mslapek/fixpythonplot. Authored-by: Michał Słapek <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]> (cherry picked from commit 371e307) Signed-off-by: Dongjoon Hyun <[email protected]>
Thanks!!!!!! |
…MPLPlot._append_legend_handles_labels ### What changes were proposed in this pull request? Replace use of MPLPlot._add_legend_handle (removed in pandas) with MPLPlot._append_legend_handles_labels in histogram and KDE plots. Based on: pandas-dev/pandas@029907c ### Why are the changes needed? Fix of SPARK-37730. plot.hist and plot.kde don't throw AttributeError for pandas=1.3.5. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? ~~Tested with existing plot test on CI (for older pandas only).~~ (it seems that CI doesn't run matplotlib tests, see apache#35000 (comment)) I've run tests on a local computer, see apache#35000 (comment) : ``` $ python python/pyspark/pandas/tests/plot/test_series_plot_matplotlib.py ``` :question: **QUESTION:** Maybe add plot testing for pandas 1.3.5 on CI? (I've noticed that CI uses `pandas=1.3.4`, maybe update it to `1.3.5`?) Closes apache#35000 from mslapek/fixpythonplot. Authored-by: Michał Słapek <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]> (cherry picked from commit 371e307) Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
Replace use of MPLPlot._add_legend_handle (removed in pandas) with MPLPlot._append_legend_handles_labels in histogram and KDE plots.
Based on: pandas-dev/pandas@029907c
Why are the changes needed?
Fix of SPARK-37730. plot.hist and plot.kde don't throw AttributeError for pandas=1.3.5.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Tested with existing plot test on CI (for older pandas only).(it seems that CI doesn't run matplotlib tests, see #35000 (comment))I've run tests on a local computer, see #35000 (comment) :
❓ QUESTION: Maybe add plot testing for pandas 1.3.5 on CI? (I've noticed that CI uses
pandas=1.3.4
, maybe update it to1.3.5
?)