-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Avoid using px.colors.sequential.Blues
that introduces pandas
dependency
#3422
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
Conversation
Thanks for the quick PR. |
@not522 , @HideakiImamura do you have time to review this PR? (Else, I can jump in) |
I found > pip uninstall pandas
Found existing installation: pandas 1.4.1
Uninstalling pandas-1.4.1:
...
Successfully uninstalled pandas-1.4.1
> python -m pytest tests/visualization_tests/test_*.py
=============================================================================== test session starts ================================================================================
...
tests/visualization_tests/test_contour.py ................. [ 16%]
tests/visualization_tests/test_edf.py ... [ 18%]
tests/visualization_tests/test_intermediate_plot.py . [ 19%]
tests/visualization_tests/test_optimization_history.py ......... [ 28%]
tests/visualization_tests/test_parallel_coordinate.py .......... [ 37%]
tests/visualization_tests/test_param_importances.py ... [ 40%]
tests/visualization_tests/test_pareto_front.py ....................................................... [ 92%]
tests/visualization_tests/test_slice.py ..... [ 97%]
tests/visualization_tests/test_utils.py ...
======================================================================== 106 passed, 1069 warnings in 3.97s ======================================================================== |
Codecov Report
@@ Coverage Diff @@
## master #3422 +/- ##
=======================================
Coverage 91.81% 91.81%
=======================================
Files 156 156
Lines 12270 12270
=======================================
Hits 11266 11266
Misses 1004 1004
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Ah, I didn't know that! Thank you for removing |
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.
Good catch! LGTM.
@nzw0301 If you're OK for this PR, it'd be nice to take over the assignment and merge. 🙏 |
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.
LGTM. I confirmed the both blues are same:
import plotly.express as px
import plotly.colors
px.colors.sequential.Blues == plotly.colors.sequential.Blues
# True
px.colors.sequential.Blues
that introduces pandas
dependency
#3376 unifies our color scale in plotly visualization. This change is really awesome but it introduces (might unintentionally)
pandas
dependency. This PR usesplotly.colors.sequential.Blues
instead ofpx.colors.sequential.Blues
to remove the importing ofplotly.express
from Optuna.Motivation
Remove
plotly.express
dependency. It also depends onpandas
: plotly/plotly.py#2279It confirms on my environment that the colormap of contour visualization is the same as other visualizations.