mathurinm / celer

Fast solver for L1-type problems: Lasso, sparse Logisitic regression, Group Lasso, weighted Lasso, Multitask Lasso, etc.
https://mathurinm.github.io/celer/
BSD 3-Clause "New" or "Revised" License
198 stars 32 forks source link

MAINT: drop deprecated plot argument #293

Closed DerWeh closed 3 months ago

DerWeh commented 3 months ago

use_line_collection is deprecated since 3.6 and was removed in 3.8, see https://matplotlib.org/3.7.3/api/_as_gen/matplotlib.pyplot.stem.html

mathurinm commented 3 months ago

Thanks @DerWeh , we still get

MatplotlibDeprecationWarning: The 'use_line_collection' parameter of stem() was deprecated in Matplotlib 3.6 and will be removed two minor releases later. If any parameter follows 'use_line_collection', they should be passed as keyword, not positionally.
  m, s, _ = plt.stem(np.where(w_true)[0], w_true[w_true != 0],

in https://output.circle-artifacts.com/output/job/2d69f75d-0a6a-44b5-ac41-9380cc2bddfc/artifacts/0/dev/auto_examples/plot_group_lasso.html#sphx-glr-auto-examples-plot-group-lasso-py (last line) can you fix this ?

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.53%. Comparing base (c1b564c) to head (682d9d8).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/mathurinm/celer/pull/293/graphs/tree.svg?width=650&height=150&src=pr&token=hCZ8E3PSmY&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)](https://app.codecov.io/gh/mathurinm/celer/pull/293?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) ```diff @@ Coverage Diff @@ ## main #293 +/- ## ======================================= Coverage 88.53% 88.53% ======================================= Files 15 15 Lines 1143 1143 Branches 127 127 ======================================= Hits 1012 1012 Misses 101 101 Partials 30 30 ``` | [Flag](https://app.codecov.io/gh/mathurinm/celer/pull/293/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/mathurinm/celer/pull/293/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more. ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/mathurinm/celer/pull/293?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/mathurinm/celer/pull/293?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Last update [c1b564c...682d9d8](https://app.codecov.io/gh/mathurinm/celer/pull/293?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).
DerWeh commented 3 months ago

You are right, I overlooked the first plt.stem call. DeprecationWarnings trigger only once, and I forgot to restart the session (or display them always)...

mathurinm commented 3 months ago

Thanks @DerWeh!