frgfm / torch-scan

Seamless analysis of your PyTorch models (RAM usage, FLOPs, MACs, receptive field, etc.)
https://frgfm.github.io/torch-scan/latest
Apache License 2.0
208 stars 22 forks source link

chore: Added annotation typing #30

Closed frgfm closed 3 years ago

frgfm commented 3 years ago

This adds annotation typing to the codebase and a related mypy CI job to close #29

codecov[bot] commented 3 years ago

Codecov Report

Merging #30 into master will increase coverage by 0.25%. The diff coverage is 98.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   89.52%   89.77%   +0.25%     
==========================================
  Files           9        9              
  Lines         563      577      +14     
==========================================
+ Hits          504      518      +14     
  Misses         59       59              
Impacted Files Coverage Δ
torchscan/process/__init__.py 100.00% <ø> (ø)
torchscan/crawler.py 82.08% <90.00%> (ø)
torchscan/modules/__init__.py 100.00% <100.00%> (ø)
torchscan/modules/flops.py 99.06% <100.00%> (+0.04%) :arrow_up:
torchscan/modules/macs.py 100.00% <100.00%> (ø)
torchscan/modules/memory.py 100.00% <100.00%> (ø)
torchscan/modules/receptive.py 100.00% <100.00%> (ø)
torchscan/process/memory.py 71.42% <100.00%> (-1.91%) :arrow_down:
torchscan/utils.py 67.39% <100.00%> (ø)