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

* fix dist ut

* fix config & hub ut break due to mmdet faster-rcnn rename
pull/655/head
Qian Zhao 2022-10-08 19:48:51 +08:00 committed by GitHub
parent 89146a5b90
commit e73c4bf135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 5 deletions

View File

@ -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'

View File

@ -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'

View File

@ -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',

View File

@ -450,7 +450,7 @@ class TestConfig:
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)

View File

@ -641,6 +641,7 @@ class TestDistWithNCCLBackend(MultiProcessTestCase):
]
data_gen = (item for item in data)
dist.all_reduce_params(data_gen, coalesce=coalesce, op=reduce_op)
if reduce_op == 'sum':
expected = (

View File

@ -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')