senwu / emmental

A deep learning framework for building multimodal multi-task learning systems.
https://emmental.readthedocs.io
MIT License
109 stars 18 forks source link

Fix warmup_percentage cause 0 warmup step issue #85

Closed senwu closed 3 years ago

senwu commented 3 years ago

Description of the problems or issues

If warmup_percentage is too small, the warmup_percentage would cause 0 warmup step issue.

Description of the proposed changes

Use math.ceil instead of int.

Test plan

A clear and concise description of how you test the new changes.

Checklist

codecov[bot] commented 3 years ago

Codecov Report

Merging #85 (a82c982) into master (87884fc) will increase coverage by 0.00%. The diff coverage is 66.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #85   +/-   ##
=======================================
  Coverage   87.82%   87.83%           
=======================================
  Files          38       38           
  Lines        1741     1742    +1     
  Branches      374      374           
=======================================
+ Hits         1529     1530    +1     
  Misses        112      112           
  Partials      100      100           
Flag Coverage Δ
unittests 87.83% <66.66%> (+<0.01%) :arrow_up:

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

Impacted Files Coverage Δ
src/emmental/learner.py 76.35% <66.66%> (+0.09%) :arrow_up: