You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a DeprecationWarning in matplotlib 3.9 turned into error in the CI:
matplotlib._api.deprecation.MatplotlibDeprecationWarning: The 'labels' parameter of boxplot() has been renamed 'tick_labels' since Matplotlib 3.9; support for the old name will be dropped in 3.11.
3 examples fail (DeprecationWarning turned into error): they have been fixed in #29471.
The easiest work-around is likely to do some version comparison something like this (not tested):
fromsklearn.utils.fixesimportparse_versionimportmatplotlibtick_labels= ...
# labels has been renamed to tick_labels in matplotlib 3.9. This code can be simplified when scikit-learn minimum supported version is 3.9tick_labels_parameter_name="tick_labels"ifparse_version(matplotlib.__version__) >=parse_version("3.9") else"labels"tick_labels_dict= {tick_labels_parameter_name: tick_labels}
plt.boxplot(..., **tick_labels_dict)
In case you want to work on this, start with a single example and make sure there is no warning when you run it locally with matplotlib 3.9, for example examples/ensemble/plot_gradient_boosting_regression.py because it runs quite fast.
The doc build works because we are pinning matplotlib<3.9, as you can tell for example from this build log.
Once all the examples listed in this issue are fixed (i.e. they don't produce warnings with matplotlib 3.9), we will be able to use matplotlib 3.9 in the doc build.
Activity
[-]Unpin matplotlib<3.9 in the CI[/-][+]CI Unpin matplotlib<3.9[/+][-]CI Unpin matplotlib<3.9[/-][+]CI Unpin matplotlib<3.9 in doc build[/+]nithish08 commentedon Jul 10, 2024
It looks like the
build-doc-and-deployworkflow is running as expected: https://app.circleci.com/pipelines/github/scikit-learn/scikit-learn?branch=main. @lesteve, should we still keep this open?lesteve commentedon Jul 11, 2024
Yes we should keep it open 😉.
In case you want to work on this, start with a single example and make sure there is no warning when you run it locally with matplotlib 3.9, for example
examples/ensemble/plot_gradient_boosting_regression.pybecause it runs quite fast.The doc build works because we are pinning matplotlib<3.9, as you can tell for example from this build log.
Once all the examples listed in this issue are fixed (i.e. they don't produce warnings with matplotlib 3.9), we will be able to use matplotlib 3.9 in the doc build.
nithish08 commentedon Jul 11, 2024
I opened a PR here - #29471. Please review when you get a chance.