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 unit test structure #433

Merged
merged 48 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
58a202d
organize the structure
congee524 Jan 22, 2021
b66c511
refactor data
congee524 Jan 22, 2021
aa4f336
modify annotations according to refactor data sturcture
congee524 Jan 22, 2021
5ccb2a2
force tracking ava_proposals_sample.pkl to test
congee524 Jan 22, 2021
46df53e
update test_compose.py test_formating.py
congee524 Jan 22, 2021
37a0b73
update test_ava_dataset.py
congee524 Jan 22, 2021
4e6e59f
update test_activity_dataset.py
congee524 Jan 22, 2021
2279521
update audio_dataset
congee524 Jan 22, 2021
593a58b
update test_audio_feature_dataset.py
congee524 Jan 22, 2021
bc8a8f9
update test_audio_visual_dataset.py
congee524 Jan 22, 2021
bab7daa
update test_hvu_dataset
congee524 Jan 22, 2021
ccd596a
update test_rawframe_dataset
congee524 Jan 22, 2021
a09dea3
update test_rawvideo_dataset
congee524 Jan 22, 2021
cb14039
update test_repeat_dataset
congee524 Jan 22, 2021
75fd702
update test_ssn_dataset
congee524 Jan 22, 2021
0ecf6e4
finish test_datasets
congee524 Jan 22, 2021
138cd63
update test_audio
congee524 Jan 22, 2021
1bb4990
update test_boxes
congee524 Jan 22, 2021
c361aa6
update test_color
congee524 Jan 22, 2021
48e9303
update test_flip
congee524 Jan 22, 2021
4ff03f2
update test_lazy
congee524 Jan 22, 2021
c762342
update test_augmentations
congee524 Jan 22, 2021
34f23ff
update test_trainsform
congee524 Jan 22, 2021
b9be79c
update test_crop
congee524 Jan 22, 2021
1a975f0
finish test_augmentation
congee524 Jan 22, 2021
6698b17
organize test_loading
congee524 Jan 22, 2021
257b5da
update test_decode
congee524 Jan 22, 2021
66442c1
update test_load
congee524 Jan 22, 2021
2509b5c
update test_localization
congee524 Jan 22, 2021
2b2e8c0
finish test_loading
congee524 Jan 22, 2021
468cda7
force tracking eval_detection/proposal.pkl
congee524 Jan 22, 2021
7fe6ea4
finish test_metrics
congee524 Jan 22, 2021
648d8bd
finish test_utils
congee524 Jan 22, 2021
e80d66e
update .gitignore to track the data file in tests/data
congee524 Jan 22, 2021
6a96fb8
finish test_runtime
congee524 Jan 22, 2021
3496204
finish refactor
congee524 Jan 22, 2021
c0b7444
use mmcv 1.2.6 to unit test
congee524 Jan 22, 2021
c02ec0a
update according to comment
congee524 Jan 22, 2021
0637e6e
fix linting
congee524 Jan 22, 2021
3062ac9
improve the coverage of recognizer3d
congee524 Jan 24, 2021
6c2e048
improve the coverage of augmentation
congee524 Jan 24, 2021
25726f8
improve the coverage of loading
congee524 Jan 24, 2021
6beb878
update changelog
congee524 Jan 24, 2021
deb1f4f
remove test/data/est_tem_results
congee524 Jan 25, 2021
233dffd
update according to comment
congee524 Jan 25, 2021
3b03e85
rename test_imgaug
congee524 Jan 25, 2021
6762c28
modify according to comments
congee524 Jan 27, 2021
c6a4d2b
rename dirs
congee524 Jan 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMCV
run: pip install mmcv-full==1.2.4 -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
run: pip install mmcv-full==1.2.6 -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
- name: Install MMDet
run: pip install git+https://github.com/open-mmlab/mmdetection/
- name: Install unittest dependencies
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html
- name: Install mmaction dependencies
run: |
pip install mmcv-full==1.2.4 -f https://download.openmmlab.com/mmcv/dist/${{matrix.mmcv}}/index.html
pip install mmcv-full==1.2.6 -f https://download.openmmlab.com/mmcv/dist/${{matrix.mmcv}}/index.html
pip install -q git+https://github.com/open-mmlab/mmdetection/
pip install -r requirements.txt
- name: Build and install
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,9 @@ work_dirs/

# Profile
*.prof

# unignore some data file in tests/data
!tests/data/**/*.pkl
!tests/data/**/*.pkl.json
!tests/data/**/*.log.json
!tests/data/**/*.pth
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
**Improvements**

- Support setting `max_testing_views` for extremely large models to save GPU memory used ([#511](https://github.com/open-mmlab/mmaction2/pull/511))
- Refactor unit test structure ([#433](https://github.com/open-mmlab/mmaction2/pull/433))
- Add repo citation ([#545](https://github.com/open-mmlab/mmaction2/pull/545))

**Bug and Typo Fixes**
Expand Down
2 changes: 1 addition & 1 deletion mmaction/models/backbones/resnet3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self,
super().__init__()
assert style in ['pytorch', 'caffe']
# make sure that only ``inflate_style`` is passed into kwargs
assert set(kwargs.keys()).issubset(['inflate_style'])
assert set(kwargs).issubset(['inflate_style'])

self.inplanes = inplanes
self.planes = planes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"frame_dir":"test_imgs",
"frame_dir":"imgs",
"total_frames":5,
"label":{
"concept":[250, 131, 42, 51, 57, 155, 122],
Expand All @@ -11,7 +11,7 @@
}
},
{
"frame_dir":"test_imgs",
"frame_dir":"imgs",
"total_frames":5,
"label":{
"concept":[250, 131, 42, 51, 57, 155, 122],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 0
test_imgs
imgs
5
1
2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 0
test_imgs
imgs
5
1
2
Expand Down
2 changes: 2 additions & 0 deletions tests/data/annotations/rawframe_test_list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imgs 5 127
imgs 5 127
2 changes: 2 additions & 0 deletions tests/data/annotations/rawframe_test_list_multi_label.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imgs 5 1
imgs 5 3 5
2 changes: 2 additions & 0 deletions tests/data/annotations/rawframe_test_list_with_offset.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imgs 2 5 127
imgs 2 5 127
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"video_dir":"test_rawvideo_dataset",
"video_dir":"rawvideo_dataset",
"label":1,
"num_clips":2,
"positive_clip_inds":[0]
Expand Down
1 change: 1 addition & 0 deletions tests/data/annotations/rawvideo_test_anno.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rawvideo_dataset 1 2 0
File renamed without changes.
2 changes: 0 additions & 2 deletions tests/data/frame_test_list.txt

This file was deleted.

2 changes: 0 additions & 2 deletions tests/data/frame_test_list_multi_label.txt

This file was deleted.

2 changes: 0 additions & 2 deletions tests/data/frame_test_list_with_offset.txt

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion tests/data/rawvideo_test_anno.txt

This file was deleted.

Loading