open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
29.6k stars 9.46k forks source link

[Bug] 'ConfigDict' object has no attribute 'workers_per_gpu' #9632

Open emelypi opened 1 year ago

emelypi commented 1 year ago

Prerequisite

Task

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

Branch

master branch https://github.com/open-mmlab/mmdetection

Environment

sys.platform: win32 Python: 3.9.15 (main, Nov 24 2022, 14:39:17) [MSC v.1916 64 bit (AMD64)] CUDA available: False MSVC: Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30136 for x64 GCC: n/a PyTorch: 1.13.1+cpu PyTorch compiling details: PyTorch built with:

TorchVision: 0.14.1+cpu OpenCV: 4.7.0 MMCV: 1.7.1 MMCV Compiler: MSVC 192829924 MMCV CUDA Compiler: not available MMDetection: 2.27.0+

Reproduces the problem - code sample

I didn't change the code at all.

Reproduces the problem - command or script

python tools\train.py yolov3_d53_mstrain-608_273e_coco.py

Reproduces the problem - error message

Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevd.py", line 1491, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "C:/Users/rpierau/Code/mmdetection/tools/train.py", line 247, in main() File "C:/Users/rpierau/Code/mmdetection/tools/train.py", line 236, in main train_detector( File "C:\Users\rpierau\Code\mmdetection\mmdet\apis\train.py", line 247, in train_detector workers_per_gpu=cfg.data.workers_per_gpu, File "C:\Users\rpierau\Code\mmdetection\openmmlab\lib\site-packages\mmcv\utils\config.py", line 50, in getattr raise ex AttributeError: 'ConfigDict' object has no attribute 'workers_per_gpu'

Additional information

I just tried to run a Yolo model with the config file provided by you. I didn't change anything.

ZwwWayne commented 1 year ago

Seems like a bug, we will fix it ASAP.