rs-station / careless

Merge X-ray diffraction data with Wilson's priors, variational inference, and metadata
MIT License
16 stars 6 forks source link

use multiprocessing to bypass tf mem leak #140

Closed kmdalton closed 11 months ago

kmdalton commented 11 months ago

This PR addresses a memory leak in tensorflow which was causing CLI to fail on the default GitHub runner which has 7GB of memory currently. I'm using the multiprocessing trick referenced in the tf issue to force tf to clean up its memory at the end of each test in tests/test_cli.py.

This PR supersedes #139 as it is a cleaner solution which does not break codecov.

codecov-commenter commented 11 months ago

Codecov Report

Merging #140 (90d36db) into main (42f8c96) will decrease coverage by 0.26%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
- Coverage   79.18%   78.92%   -0.26%     
==========================================
  Files          52       52              
  Lines        2344     2344              
==========================================
- Hits         1856     1850       -6     
- Misses        488      494       +6     
Flag Coverage Δ
unittests 78.92% <ø> (-0.26%) :arrow_down:

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

see 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more