Skip to content

Conversation

@pmeier
Copy link
Contributor

@pmeier pmeier commented Sep 22, 2022

In the past we abandoned codecov.io since hitting a specific coverage was never a target and the bot comments only added noise to PRs. Still, it would be useful to have some kind of coverage information in the CI. This is especially useful now that we are ramping up testing for the prototype namespaces.

This PR adds coverage as terminal output for the prototype test CI. This only adds a few lines of useful information at the test summary.

@pmeier
Copy link
Contributor Author

pmeier commented Sep 22, 2022

Example output for the transforms tests:

Name                                                              Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------------------
torchvision/prototype/transforms/__init__.py                         12      0   100%
torchvision/prototype/transforms/_augment.py                        228     50    78%   38, 112, 119, 133, 144, 174, 188, 229-231, 273-277, 312-331, 334-376
torchvision/prototype/transforms/_auto_augment.py                   189     15    92%   44-45, 48, 50, 144, 217-274, 292-294, 413, 461
torchvision/prototype/transforms/_color.py                          118     32    73%   42, 48-50, 97-102, 105-106, 116-126, 131-151
torchvision/prototype/transforms/_container.py                       62      5    92%   22-25, 33
torchvision/prototype/transforms/_deprecated.py                      46      0   100%
torchvision/prototype/transforms/_geometry.py                       483     18    96%   93, 96, 99, 136-137, 142-143, 187, 208, 446, 451, 561, 590, 664, 811-812, 873, 876
torchvision/prototype/transforms/_meta.py                            41     10    76%   14-17, 20-21, 50, 54, 71-72
torchvision/prototype/transforms/_misc.py                           105     22    79%   16, 29, 32-37, 58, 78, 85, 109, 145-146, 149, 156-157, 160-171, 174
torchvision/prototype/transforms/_presets.py                         42     42     0%   5-69
torchvision/prototype/transforms/_transform.py                       44      9    80%   45-55, 61
torchvision/prototype/transforms/_type_conversion.py                 42      4    90%   16, 34-37
torchvision/prototype/transforms/_utils.py                           67      3    96%   64, 66, 80
torchvision/prototype/transforms/functional/__init__.py               8      0   100%
torchvision/prototype/transforms/functional/_augment.py              18      0   100%
torchvision/prototype/transforms/functional/_color.py                91      6    93%   68, 76-81
torchvision/prototype/transforms/functional/_deprecated.py           30     17    43%   18-27, 31-52, 57-61, 65-69
torchvision/prototype/transforms/functional/_geometry.py            527     31    94%   124, 170, 183, 186, 189, 192, 195, 198, 207, 213, 216, 219, 475, 509-510, 526-527, 634, 661, 685, 777, 801, 887, 981, 1163, 1175-1176, 1195-1196, 1217, 1254
torchvision/prototype/transforms/functional/_meta.py                137     13    91%   33, 37-38, 47-48, 121, 151, 154, 183, 201-202, 205, 218
torchvision/prototype/transforms/functional/_misc.py                 45     12    73%   20, 31, 33, 36, 42, 44, 48, 51, 60-62, 71
torchvision/prototype/transforms/functional/_type_conversion.py      31      7    77%   15-18, 23-24, 34
-----------------------------------------------------------------------------------------------
TOTAL                                                              2366    296    87%

Copy link
Contributor

@YosuaMichael YosuaMichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good idea, thanks @pmeier!

@pmeier pmeier merged commit d65e286 into pytorch:main Sep 23, 2022
@pmeier pmeier deleted the prototype-coverage branch September 23, 2022 11:58
facebook-github-bot pushed a commit that referenced this pull request Sep 29, 2022
Summary:
* add coverage to prototype tests CI

* line continuation

Reviewed By: YosuaMichael

Differential Revision: D39885421

fbshipit-source-id: 514275f7b5f03bd6cd108572857e0552f35053f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants