rs-station / careless

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

decrease validation frequency;add flag to control #77

Closed kmdalton closed 1 year ago

kmdalton commented 1 year ago

Running the model on the test data and computing metrics does not need to happen at every training step. This slows down training at least 2-fold for no reason. This PR sets the default behavior to validate the model every 10 training steps and adds a flag, --validation-frequency to control the behavior.

codecov-commenter commented 1 year ago

Codecov Report

Merging #77 (ff217c4) into main (63fd4aa) will decrease coverage by 0.03%. The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
- Coverage   81.04%   81.01%   -0.04%     
==========================================
  Files          39       39              
  Lines        1562     1564       +2     
==========================================
+ Hits         1266     1267       +1     
- Misses        296      297       +1     
Flag Coverage Δ
unittests 81.01% <50.00%> (-0.04%) :arrow_down:

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

Impacted Files Coverage Δ
careless/args/crossvalidation.py 100.00% <ø> (ø)
careless/models/merging/variational.py 83.83% <33.33%> (-0.86%) :arrow_down:
careless/careless.py 62.50% <100.00%> (+0.47%) :arrow_up:

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