[WIP] Create matplotlib backend for plotting functions.#1707
[WIP] Create matplotlib backend for plotting functions.#1707ytknzw wants to merge 6 commits intooptuna:masterfrom
Conversation
toshihikoyanase
left a comment
There was a problem hiding this comment.
Thank you for your PR. It looks great!
I created a notebook to check the generated graphs and they look nice.
A nit-picky, but I have some comments on the code comments. Please take a look.
|
Thank you for your quick review. Just updated the code comments. |
|
I think this is quite nice - plotly has always been fairly difficult for me to install (particularly to get them to show up in jupyter). |
|
Great, you've already implemented several of them. I'm just curious what the scope of this PR is. I believe we should also discuss how to introduce the |
|
Yes, we should discuss how to bring features to users. Sooner is better. The scope of this PR itself is to implement the |
|
Did you plan to cover all of them? I'm wondering if some visualization functions aren't somewhat tricky to implement, such as the parallel coordinate plot. As you've already done a great job implementing several of the existing functions, how about moving on to designing the public API? I think we can cover the logic for how Optuna should behave when a function is not implemented with either library there, and then work on the visualization functions one by one. Having separate PRs for each one would make reviewing easier as well, which presumably would benefit us all. |
|
Thank you for your comments.
Yes, I intend to implement all the functions with matplotlib backend in this PR.
I'm confused. @toshihikoyanase commented in issue #1539 as follows:
On the other hand, in my understanding, your suggestion is to stop implementing matplotlib backend functions now and to start thinking about the modification of current APIs (e.g.
OK, I close this PR and will instead make separate PRs later. |
|
I’m sorry if my comment confused you, it was just an idea to open up a discussion. Let me try to make up for it. First and foremost, you don’t have to close this PR. Instead, we could continue working on this one to discuss the public API. What do you think @toshihikoyanase, @ytknzw? Some approaches for how we could go about designing the public API.
I would suggest 3., as you might have noticed. And if so, changes required from this PR are not that large and we could incorporate them here. |
|
@ytknzw @hvy I'm sorry for confusing you. When I suggested separating the PRs, we didn't have implementation and I couldn't imagine the pros & cons of the Interface choices. Now, thanks to the hard work of @ytknzw , we have three visualization functions and IMO, we can discuss the interface now. @hvy Thank you for your comments on the interface. I agree with your suggestion to introduce @ytknzw I'm really sorry for changing my mind, but I think we can keep this PR and add a few changes to create the minimum public interface. What do you think? |
|
@hvy @toshihikoyanase Thank you for clarifications and sorry for my slow reply! I agree with you two. To introduce |
|
Not slow at all, thanks for taking your time.
I'm fine with either. What do you feel more comfortable with? It would be easier to focus on the implementation/review if we create different PRs, one for fixing the API, followed by PRs for implementing the graphics. It's not a strong opinion. |
|
Thanks. I agree with your points. Modifying API and implementing matplotlib backend are different tasks. I'll creat another PR for |
|
Thanks, @ytknzw for the great work for plotting functions! I'm very excited to merge these functions into Optuna. I will check and review this and subsequent PRs. |
|
@HideakiImamura |


This PR proposes to implement
matplotlibbackend for plotting functions.Motivation
To provide another visualization option for users, who have only
plotlynow.See issue #1539 for the original motivation.
Description of the changes
optuna.visualization_optimization_history_matplotlib.py_get_optimization_history_plot_matplotlib_get_optimization_history_plot_intermediate_values_matplotlib.py_get_intermediate_plot_matplotlib_get_intermediate_plot_edf_matplotlib.py_get_edf_plot_matplotlib_get_edf_plotList of Plotly backend functions to be implemented
visualization._contour.plot_contourvisualization._contour._get_contour_plotvisualization._contour._generate_contour_subplotvisualization._edf.plot_edfvisualization._edf._get_edf_plotvisualization._intermediate_values.plot_intermediate_valuesvisualization._intermediate_values._get_intermediate_plotvisualization._optimization_history.plot_optimization_historyvisualization._optimization_history._get_optimization_history_plotvisualization._parallel_coordinate.plot_parallel_coordinatevisualization._parallel_coordinate._get_parallel_coordinate_plotvisualization._param_importances.plot_param_importancesvisualization._param_importances._get_distributionvisualization._param_importances._get_colorvisualization._param_importances._make_hovertextvisualization._slice.plot_slicevisualization._slice._get_slice_plotvisualization._slice._generate_slice_subplotmulti_objective.visualization._pareto_front.plot_pareto_frontmulti_objective.visualization._pareto_front._get_pareto_front_2dmulti_objective.visualization._pareto_front._get_pareto_front_3dmulti_objective.visualization._pareto_front._make_hovertext