Repository: open-mmlab/mmdetection

Issue:
Why using repeated dataset in val_dataloader ?
### Prerequisite

- [X] I have searched [Issues](https://github.com/open-mmlab/mmdetection/issues) and [Discussions](https://github.com/open-mmlab/mmdetection/discussions) but cannot get the expected help.
- [X] I have read the [FAQ documentation](https://mmdetection.readthedocs.io/en/latest/faq.html) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version (master)](https://github.com/open-mmlab/mmdetection) or [latest version (3.x)](https://github.com/open-mmlab/mmdetection/tree/dev-3.x).

### Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

### Branch

3.x branch https://github.com/open-mmlab/mmdetection/tree/3.x

### Environment

https://github.com/open-mmlab/mmdetection/blob/3.x/configs/common/ms_3x_coco-instance.py#L53

### Reproduces the problem - code sample

https://github.com/open-mmlab/mmdetection/blob/3.x/configs/common/ms_3x_coco-instance.py#L53

### Reproduces the problem - command or script

https://github.com/open-mmlab/mmdetection/blob/3.x/configs/common/ms_3x_coco-instance.py#L53

### Reproduces the problem - error message

https://github.com/open-mmlab/mmdetection/blob/3.x/configs/common/ms_3x_coco-instance.py#L53

### Additional information

https://github.com/open-mmlab/mmdetection/blob/3.x/configs/common/ms_3x_coco-instance.py#L53


Discussion:
Thanks for your bug report. It was a mistake during refactoring. We will fix it asap.

Resolving patch:
diff --git a/configs/common/ms_3x_coco-instance.py b/configs/common/ms_3x_coco-instance.py
--- a/configs/common/ms_3x_coco-instance.py
+++ b/configs/common/ms_3x_coco-instance.py
@@ -43,31 +43,31 @@
     persistent_workers=True,
     sampler=dict(type='DefaultSampler', shuffle=True),
     batch_sampler=dict(type='AspectRatioBatchSampler'),
-    dataset=dict(
-        type=dataset_type,
-        data_root=data_root,
-        ann_file='annotations/instances_train2017.json',
-        data_prefix=dict(img='train2017/'),
-        filter_cfg=dict(filter_empty_gt=True, min_size=32),
-        pipeline=train_pipeline,
-        backend_args=backend_args))
-val_dataloader = dict(
-    batch_size=2,
-    num_workers=2,
-    persistent_workers=True,
-    drop_last=False,
-    sampler=dict(type='DefaultSampler', shuffle=False),
     dataset=dict(
         type='RepeatDataset',
         times=3,
         dataset=dict(
             type=dataset_type,
             data_root=data_root,
-            ann_file='annotations/instances_val2017.json',
-            data_prefix=dict(img='val2017/'),
-            test_mode=True,
-            pipeline=test_pipeline,
+            ann_file='annotations/instances_train2017.json',
+            data_prefix=dict(img='train2017/'),
+            filter_cfg=dict(filter_empty_gt=True, min_size=32),
+            pipeline=train_pipeline,
             backend_args=backend_args)))
+val_dataloader = dict(
+    batch_size=1,
+    num_workers=2,
+    persistent_workers=True,
+    drop_last=False,
+    sampler=dict(type='DefaultSampler', shuffle=False),
+    dataset=dict(
+        type=dataset_type,
+        data_root=data_root,
+        ann_file='annotations/instances_val2017.json',
+        data_prefix=dict(img='val2017/'),
+        test_mode=True,
+        pipeline=test_pipeline,
+        backend_args=backend_args))
 test_dataloader = val_dataloader
 
 val_evaluator = dict(


Test patch: