mmdetection3d icon indicating copy to clipboard operation
mmdetection3d copied to clipboard

[Docs] Traceback (most recent call last): File "tools/train.py", line 135, in <module> main() File "tools/train.py", line 124, in main runner = Runner.from_cfg(cfg) File "/home/qwe/.local/lib/python3.8/site-packages/mmengine/runner/runner.py", line 445, in from_cfg runner = cls( File "/home/qwe/.local/lib/python3.8/site-packages/mmengine/runner/runner.py", line 292, in __init__ raise ValueError( ValueError: train_dataloader, train_cfg, and optim_wrapper should be either all None or not None, but got train_dataloader=None, train_cfg={'type': 'EpochBasedTrainLoop', 'max_epochs': 12, 'val_interval': 1}, optim_wrapper={'type': 'OptimWrapper', 'optimizer': {'type': 'SGD', 'lr': 0.02, 'momentum': 0.9, 'weight_decay': 0.0001}}.

Open duanmushuangquan opened this issue 9 months ago • 3 comments

Branch

main branch https://mmdetection3d.readthedocs.io/en/latest/

📚 The doc issue

I am in the mmdetection3d directory and haven't made any modifications; I directly executed the command:

CUDA_VISIBLE_DEVICES=1 python tools/train.py mmdetection3d/configs/nuimages/cascade-mask-rcnn_r50_fpn_1x_nuim.py --work-dir res_train_1_cascade_mask_rcnn

But I received an error.

Traceback (most recent call last):
  File "tools/train.py", line 135, in <module>
    main()
  File "tools/train.py", line 124, in main
    runner = Runner.from_cfg(cfg)
  File "/home/qwe/.local/lib/python3.8/site-packages/mmengine/runner/runner.py", line 445, in from_cfg
    runner = cls(
  File "/home/qwe/.local/lib/python3.8/site-packages/mmengine/runner/runner.py", line 292, in __init__
    raise ValueError(
ValueError: train_dataloader, train_cfg, and optim_wrapper should be either all None or not None, but got train_dataloader=None, train_cfg={'type': 'EpochBasedTrainLoop', 'max_epochs': 12, 'val_interval': 1}, optim_wrapper={'type': 'OptimWrapper', 'optimizer': {'type': 'SGD', 'lr': 0.02, 'momentum': 0.9, 'weight_decay': 0.0001}}.

Suggest a potential alternative/fix

No response

duanmushuangquan avatar Sep 21 '23 11:09 duanmushuangquan

Did anyone find any fix?

mondalanindya avatar Dec 01 '23 00:12 mondalanindya

@mondalanindya @duanmushuangquan Hi! Did anyone find any fix?

Chenhongchang avatar Jan 14 '24 09:01 Chenhongchang

I have fixed it. I set train_cfg, and optim_wrapper to none and it works. @mondalanindya @duanmushuangquan

Chenhongchang avatar Jan 16 '24 05:01 Chenhongchang