microsoft / hummingbird

Hummingbird compiles trained ML models into tensor computation for faster inference.
MIT License
3.32k stars 274 forks source link

fix: support varying batch sizes #654

Closed stillmatic closed 1 year ago

stillmatic commented 1 year ago

closes #653

I have signed the Microsoft CLA.

(apologies for the formatting changes, they were from running pre-commit black)

codecov-commenter commented 1 year ago

Codecov Report

Merging #654 (ee84c0b) into main (37849b5) will increase coverage by 0.03%. The diff coverage is 100.00%.

:exclamation: Current head ee84c0b differs from pull request most recent head 3c7e1c1. Consider uploading reports for the commit 3c7e1c1 to get more accurate results

@@            Coverage Diff             @@
##             main     #654      +/-   ##
==========================================
+ Coverage   90.26%   90.29%   +0.03%     
==========================================
  Files          77       77              
  Lines        4559     4532      -27     
  Branches      846      838       -8     
==========================================
- Hits         4115     4092      -23     
+ Misses        251      250       -1     
+ Partials      193      190       -3     
Flag Coverage Δ
unittests 90.29% <100.00%> (+0.03%) :arrow_up:

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

Impacted Files Coverage Δ
hummingbird/ml/_topology.py 85.18% <100.00%> (ø)
hummingbird/ml/_utils.py 88.13% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

ksaur commented 1 year ago

Thanks for working on this!! :)  I think the 30+ changed files are because our line lengths are usually 127 chars from the flake8.  (Although apparently it seems we have other various inconsistencies in our codebase heh.)  It might make it easier to troubleshoot, but no worries, not super strict!

stillmatic commented 1 year ago

thanks, I've reverted the formatting commit, I think my pre-commit isn't properly picking up the repo's config.

stillmatic commented 1 year ago

also preemptively pushing up a version bump - lmk if you'd rather make it a patch release (with a fix to the bumpversion config)

interesaaat commented 1 year ago

also preemptively pushing up a version bump - lmk if you'd rather make it a patch release (with a fix to the bumpversion config)

@ksaur WDYT?

ksaur commented 1 year ago

I will take care of the patch release in a separate PR, thanks!

ksaur commented 1 year ago

Thanks @stillmatic, revert the version bump and we'll merge!

stillmatic commented 1 year ago

version bump is reverted!

interesaaat commented 1 year ago

Thanks @stillmatic for fixing this!

ksaur commented 1 year ago

Will push patch today by 5pmPT!