Skip to content
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

Ignore Seaborn plot warnings #3576

Merged
merged 3 commits into from
Jun 10, 2021
Merged

Ignore Seaborn plot warnings #3576

merged 3 commits into from
Jun 10, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jun 10, 2021

Suppress empty matrix RuntimeWarning: All-NaN slice encountered when empty data (no detections) is passed to the confusion matrix.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhancements in the visualization of model metrics and label correlations.

📊 Key Changes

  • Included warnings import in metrics.py to handle potential warnings.
  • Wrapped heatmap generation code with a warning filter to suppress RuntimeWarnings related to empty matrices.
  • Renamed the seaborn import alias from sns to sn to maintain consistency across different files.

🎯 Purpose & Impact

  • The addition of warnings suppresses inconsequential runtime alerts which makes logs cleaner and user experience smoother.
  • Renaming the alias to sn standardizes the codebase and avoids confusion for future development and maintenance.
  • Users will benefit from a more stable tool when analyzing model performance and label distributions, without being distracted by non-critical warnings.

@glenn-jocher glenn-jocher self-assigned this Jun 10, 2021
@glenn-jocher glenn-jocher merged commit 095197b into master Jun 10, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-4 branch June 10, 2021 11:51
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
* Ignore Seaborn plot warnings

* Update plots.py

* Update metrics.py

(cherry picked from commit 095197b)
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Ignore Seaborn plot warnings

* Update plots.py

* Update metrics.py
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.

1 participant