Skip to content

Conversation

@gitttt-1234
Copy link
Collaborator

Summary

  • Adds a new load_legacy_metrics.py module to handle loading metrics files from SLEAP versions <=v1.4.1
  • Fixes NumPy 2.x compatibility by using public API (read_array_header_1_0, read_array_header_2_0) instead of removed private functions (_check_version, _read_array_header)
  • Updates configs.py to detect and load legacy metrics format, displaying them in the evaluation metrics GUI table
  • Fixes timestamp parsing to fallback to extracting from file path when run_name doesn't contain the timestamp pattern
  • Updates labels.py to use the new legacy metrics loader for CLI output

Test plan

  • Load a legacy SLEAP model checkpoint (<=v1.4.1) in the GUI metrics viewer
  • Verify metrics display correctly in the table (mAP, mAR, PCK, OKS, distance percentiles)
  • Verify timestamp column shows correct date/time parsed from folder name
  • Verify new sleap-nn format models still load correctly
  • Run ruff check to confirm linting passes

🤖 Generated with Claude Code

- Add load_legacy_metrics.py module to handle unpickling legacy metrics files
  with NumPy 2.x compatibility (uses public API instead of removed private functions)
- Update configs.py to load and display metrics from legacy model checkpoints
- Fix timestamp parsing to fallback to path when run_name lacks timestamp
- Update labels.py to use new legacy metrics loader

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 11.32075% with 94 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.06%. Comparing base (5f6eb12) to head (b2c4a42).

Files with missing lines Patch % Lines
sleap/gui/learning/load_legacy_metrics.py 18.64% 48 Missing ⚠️
sleap/gui/learning/configs.py 2.94% 33 Missing ⚠️
sleap/info/labels.py 0.00% 13 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2480      +/-   ##
===========================================
- Coverage    59.40%   59.06%   -0.34%     
===========================================
  Files           68       69       +1     
  Lines        13232    13324      +92     
===========================================
+ Hits          7860     7870      +10     
- Misses        5372     5454      +82     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants