Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Refactor unittest #321

Merged
merged 7 commits into from
Jul 8, 2021

Conversation

mzr1996
Copy link
Member

@mzr1996 mzr1996 commented Jun 23, 2021

According to https://openmmlab.feishu.cn/docs/doccnlof7fz6WSoiKCiahzj4pbd to refactor our unit tests files.
These files are re-organized and some unit tests are splited to new files.

@mzr1996 mzr1996 requested a review from ycxioooong June 23, 2021 03:11
@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #321 (ce2d881) into master (71621a5) will increase coverage by 1.22%.
The diff coverage is 80.00%.

❗ Current head ce2d881 differs from pull request most recent head 59d654f. Consider uploading reports for the commit 59d654f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #321      +/-   ##
==========================================
+ Coverage   74.79%   76.02%   +1.22%     
==========================================
  Files          96       96              
  Lines        5106     5109       +3     
  Branches      849      849              
==========================================
+ Hits         3819     3884      +65     
+ Misses       1177     1106      -71     
- Partials      110      119       +9     
Flag Coverage Δ
unittests 76.02% <80.00%> (+1.22%) ⬆️

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

Impacted Files Coverage Δ
mmcls/models/utils/helpers.py 79.16% <80.00%> (+7.73%) ⬆️
mmcls/models/classifiers/image.py 91.22% <0.00%> (+7.01%) ⬆️
mmcls/models/heads/linear_head.py 86.20% <0.00%> (+24.13%) ⬆️
mmcls/models/heads/vision_transformer_head.py 93.02% <0.00%> (+25.58%) ⬆️
mmcls/models/classifiers/base.py 71.57% <0.00%> (+41.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71621a5...59d654f. Read the comment docs.

@mzr1996 mzr1996 force-pushed the refactor-unittest branch from ee199a5 to 09485f7 Compare July 6, 2021 08:12
@mzr1996 mzr1996 changed the title Refactor unittest [Refactor] Refactor unittest Jul 6, 2021
@mzr1996 mzr1996 force-pushed the refactor-unittest branch 2 times, most recently from 871e1e3 to 2ac8fdf Compare July 7, 2021 05:36
Copy link
Contributor

@ycxioooong ycxioooong left a comment

Choose a reason for hiding this comment

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

LGTM

@mzr1996 mzr1996 force-pushed the refactor-unittest branch from 2ac8fdf to 59d654f Compare July 7, 2021 12:14
@ycxioooong ycxioooong merged commit 1a7cebe into open-mmlab:master Jul 8, 2021
@mzr1996 mzr1996 deleted the refactor-unittest branch July 28, 2021 03:34
mzr1996 added a commit to mzr1996/mmpretrain that referenced this pull request Nov 24, 2022
* Refactor unit tests folder structure.

* Remove label smooth and Vit test in `test_classifiers.py`

* Rename test_utils in dataset to test_dataset_utils

* Split test_models/test_utils/test_utils.py to multiple sub files.

* Add unit tests of classifiers and heads

* Use patch context manager.

* Add unit test of `is_tracing`, and add warning in `is_tracing` if torch
verison is smaller than 1.6.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants