Skip to content

Conversation

@desilinguist
Copy link
Collaborator

@desilinguist desilinguist commented Jan 5, 2024

  • Replace set_xticklabels() calls in several notebooks since the new version of matplotlib discourages the use of set_xticklabels() and displays warnings in the notebooks. The recommended replacement is to use set_xticks() instead.
  • Replace scale in sns.catplot() since seaborn is deprecating the scale parameter and encourages the use of matplotlib Line2D parameters directly, i.e., markersize. However, the units are different.
  • Remove unneeded warning suppressions. The latest version of seaborn and matplotlib no longer generate the two types of warnings we were manually suppressing.

I ran STRICT=1 nose2 -s tests and all tests passed which means there were no warnings generated in notebooks. To double check, I ran grep ' output_stderr ' test_outputs/*/report/*.html and this confirmed that there were no unexpected warnings generated.

To review:

  1. Run a few experiments manually to see that no warnings are generated.
  2. Run STRICT=1 nose2 -s tests using a python 3.8 environment (mine was 3.11) and check that there were no warnings generated using the methods I suggested above.
  3. Review the actual changes made to the code.

Closes #655.

The new version of matplotlib discourages the use of `set_xticklabels()`
and displays warnings in the notebook. The recommended replacement is to use
`set_xticks()` instead.
Seaborn is deprecating the `scale` parameter and encourages the use
of matplotlib Line2D parameters directly, i.e., `markersize`. However,
the units are different.
The latest version of seaborn and matplotlib no longer generate
the two types of warnings we were manually suppressing.
@codecov
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cd4f7f6) 95.83% compared to head (29ef1c0) 95.83%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #668   +/-   ##
=======================================
  Coverage   95.83%   95.83%           
=======================================
  Files          32       32           
  Lines        4489     4489           
=======================================
  Hits         4302     4302           
  Misses        187      187           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tamarl08
Copy link
Contributor

tamarl08 commented Jan 8, 2024

Looks good, no warnings, tests passed with 3.8!

Fix the layout for the built-in model diagnostic plots that were being cut off.
@damien2012eng
Copy link
Member

LGTM!

@desilinguist desilinguist merged commit d7e776b into main Jan 8, 2024
@delete-merged-branch delete-merged-branch bot deleted the 655-fix-warnings branch January 8, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove suppressed warning after new version of seaborn is available

4 participants