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

[Fix] some out-of-date unittests #586

Merged
merged 2 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/data/config/py_config/test_get_external_cfg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = [
'mmdet::_base_/models/faster_rcnn_r50_fpn.py',
'mmdet::_base_/models/faster-rcnn_r50_fpn.py',
'mmdet::_base_/datasets/coco_detection.py',
'mmdet::_base_/schedules/schedule_1x.py',
'mmdet::_base_/default_runtime.py'
Expand Down
2 changes: 1 addition & 1 deletion tests/data/config/py_config/test_get_external_cfg2.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = 'mmdet::faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py'
_base_ = 'mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py'
2 changes: 1 addition & 1 deletion tests/data/config/py_config/test_get_external_cfg3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) OpenMMLab. All rights reserved.
_base_ = [
'mmdet::_base_/models/faster_rcnn_r50_fpn.py',
'mmdet::_base_/models/faster-rcnn_r50_fpn.py',
'mmdet::_base_/datasets/coco_detection.py',
'mmdet::_base_/schedules/schedule_1x.py',
'mmdet::_base_/default_runtime.py',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def test_get_cfg_path_external(self):
filename = 'py_config/simple_config.py'
filename = osp.join(self.data_path, 'config', filename)

cfg_name = 'mmdet::faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py'
cfg_name = 'mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py'
cfg_path, scope = Config._get_cfg_path(cfg_name, filename)
assert scope == 'mmdet'
osp.isfile(cfg_path)
Expand Down
1 change: 1 addition & 0 deletions tests/test_dist/test_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ def test_all_reduce_params(self):
]

data_gen = (item for item in data)
dist.all_reduce_params(data_gen, coalesce=coalesce, op=reduce_op)

if reduce_op == 'sum':
expected = (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hub/test_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ def test_get_config():
def test_get_model():
# TODO compatible with downstream codebase.
DefaultScope.get_instance('test_get_model', scope_name='test_scope')
get_model('mmdet::faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py')
get_model('mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py')
assert DefaultScope.get_current_instance().scope_name == 'test_scope'
DefaultScope._instance_dict.pop('test_get_model')