Skip to content

Conversation

@jveitchmichaelis
Copy link
Collaborator

@jveitchmichaelis jveitchmichaelis commented Dec 31, 2025

Description

detach losses when logging. It's probable that lightning does this for us under the hood, but good to be clear.

@bw4sz want to try these fixes with your bird model branch?

I have also tried garbage collection, but I'm not sure it's necessary. Better to identify where we might be leaking.

Related Issue(s)

#1247

AI-Assisted Development

Some sanity checking with Claude Code, and an assisted review of where we might be missing resets etc.

  • I used AI tools (e.g., GitHub Copilot, ChatGPT, etc.) in developing this PR
  • I understand all the code I'm submitting

@jveitchmichaelis jveitchmichaelis changed the title reduce possibilities for memory leaks Minor memory improvements. Dec 31, 2025
@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.75%. Comparing base (0ab23a3) to head (04fb3d1).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1254      +/-   ##
==========================================
+ Coverage   87.73%   87.75%   +0.01%     
==========================================
  Files          20       20              
  Lines        2716     2720       +4     
==========================================
+ Hits         2383     2387       +4     
  Misses        333      333              
Flag Coverage Δ
unittests 87.75% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@jveitchmichaelis jveitchmichaelis force-pushed the mem-improvements branch 2 times, most recently from 3cc27e5 to 893adca Compare December 31, 2025 19:53
@jveitchmichaelis jveitchmichaelis changed the title Minor memory improvements. Improvements to epoch-end logging Dec 31, 2025
@jveitchmichaelis jveitchmichaelis force-pushed the mem-improvements branch 2 times, most recently from 57a0954 to 034dc85 Compare December 31, 2025 20:31
@jveitchmichaelis jveitchmichaelis marked this pull request as ready for review December 31, 2025 21:38
@jveitchmichaelis jveitchmichaelis force-pushed the mem-improvements branch 5 times, most recently from 42ad6e8 to 3e84a0a Compare January 1, 2026 03:25
@jveitchmichaelis jveitchmichaelis removed the request for review from bw4sz January 2, 2026 02:36
@jveitchmichaelis jveitchmichaelis changed the title Improvements to epoch-end logging detach losses when logging Jan 2, 2026
@jveitchmichaelis jveitchmichaelis requested review from bw4sz and henrykironde and removed request for bw4sz January 2, 2026 02:52
Copy link
Collaborator

@bw4sz bw4sz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that pytorch lightning should be doing this, but I don't see a downside for us to be sure.

@bw4sz bw4sz merged commit e909cd3 into weecology:main Jan 2, 2026
7 checks passed
@jveitchmichaelis jveitchmichaelis deleted the mem-improvements branch January 2, 2026 21:34
bw4sz pushed a commit that referenced this pull request Jan 11, 2026
bw4sz pushed a commit that referenced this pull request Jan 16, 2026
bw4sz pushed a commit that referenced this pull request Jan 16, 2026
bw4sz pushed a commit that referenced this pull request Jan 16, 2026
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