ValueError: class EpochBasedTrainLoop
in mmengine/runner/loops.py: class YOLOv5CocoDataset
in mmyolo/datasets/yolov5_coco.py: need at least one array to concatenate
#475
-
How can I fix it? Traceback (most recent call last):
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/opt/ml/project/mmyolo/mmyolo/datasets/yolov5_coco.py", line 19, in __init__
super().__init__(*args, **kwargs)
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmdet/datasets/base_det_dataset.py", line 33, in __init__
super().__init__(*args, **kwargs)
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/dataset/base_dataset.py", line 247, in __init__
self.full_init()
File "/opt/ml/project/mmyolo/mmyolo/datasets/yolov5_coco.py", line 43, in full_init
self.data_bytes, self.data_address = self._serialize_data()
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/dataset/base_dataset.py", line 764, in _serialize_data
data_bytes = np.concatenate(data_list)
File "<__array_function__ internals>", line 180, in concatenate
ValueError: need at least one array to concatenate
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/runner/loops.py", line 43, in __init__
super().__init__(runner, dataloader)
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/runner/base_loop.py", line 26, in __init__
self.dataloader = runner.build_dataloader(
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1333, in build_dataloader
dataset = DATASETS.build(dataset_cfg)
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/registry/registry.py", line 521, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 135, in build_from_cfg
raise type(e)(
ValueError: class `YOLOv5CocoDataset` in mmyolo/datasets/yolov5_coco.py: need at least one array to concatenate
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tools/train.py", line 116, in <module>
main()
File "tools/train.py", line 112, in main
runner.train()
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1648, in train
self._train_loop = self.build_train_loop(
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1440, in build_train_loop
loop = LOOPS.build(
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/registry/registry.py", line 521, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 135, in build_from_cfg
raise type(e)(
ValueError: class `EpochBasedTrainLoop` in mmengine/runner/loops.py: class `YOLOv5CocoDataset` in mmyolo/datasets/yolov5_coco.py: need at least one array to concatenate |
Beta Was this translation helpful? Give feedback.
Answered by
Redreadblack
Feb 27, 2023
Replies: 3 comments
-
Have you solved this problem? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@nanpuhaha Can you provide details? |
Beta Was this translation helpful? Give feedback.
0 replies
-
metainfo中的classes需要小写,以前是大写,今天刚被@hhaAndroid指导这个问题 ,你可以试试 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hhaAndroid
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
metainfo中的classes需要小写,以前是大写,今天刚被@hhaAndroid指导这个问题 ,你可以试试