ThomasVonWu / SparseEnd2End

End2EndPerception deployment solution based on vision sparse transformer paradigm is open sourced.
MIT License
47 stars 9 forks source link

TypeError: evaluate() got an unexpected keyword argument 'logger #3

Open Tangme10 opened 4 days ago

Tangme10 commented 4 days ago

2024-10-23 16:47:27,360 - E2E - INFO - Iter [33/66] lr: 5.914e-05, eta: 0:00:15, time: 0.432, data_time: 0.142, memory: 3242, loss_cls_0: 1.3373, loss_box_0: 3.8323, loss_cns_0: 0.6536, loss_yns_0: 0.2939, loss_cls_1: 1.3068, loss_box_1: 4.2003, loss_cns_1: 0.6168, loss_yns_1: 0.0876, loss_cls_2: 1.3737, loss_box_2: 4.1422, loss_cns_2: 0.5958, loss_yns_2: 0.2828, loss_cls_3: 1.3378, loss_box_3: 4.0926, loss_cns_3: 0.6608, loss_yns_3: 0.1000, loss_cls_4: 1.3374, loss_box_4: 4.1621, loss_cns_4: 0.6250, loss_yns_4: 0.1767, loss_cls_5: 1.3905, loss_box_5: 4.0833, loss_cns_5: 0.6133, loss_yns_5: 0.2006, loss_cls_dn_0: 0.5594, loss_box_dn_0: 1.2026, loss_cls_dn_1: 0.4705, loss_box_dn_1: 1.4945, loss_cls_dn_2: 0.4883, loss_box_dn_2: 1.6521, loss_cls_dn_3: 0.4992, loss_box_dn_3: 1.5754, loss_cls_dn_4: 0.4563, loss_box_dn_4: 1.6762, loss_cls_dn_5: 0.5209, loss_box_dn_5: 1.7485, loss_dense_depth: 1.6339, loss: 51.4810, grad_norm: 107.7620 [>>>>>>>>>>>>> ] 22/81, 6.0 task/s, elapsed: 4s, ETA: 10s/home/qw/Tangme10/SparseEnd2End/dataset/pipeline/nuscenes/nusc_pipeline.py:291: RuntimeWarning: invalid value encountered in cast U = np.round(pts_2d[:, 0]).astype(np.int32) [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 81/81, 5.9 task/s, elapsed: 14s, ETA: 0sTraceback (most recent call last): File "script/train.py", line 140, in main() File "script/train.py", line 127, in main train_api( File "/home/qw/Tangme10/SparseEnd2End/tool/trainer/train_sdk.py", line 119, in train_api runner.run(data_loaders, cfg["workflow"]) File "/home/qw/Tangme10/SparseEnd2End/tool/runner/iter_based_runner.py", line 109, in run iter_runner(iter_loaders[i], **kwargs) File "/home/qw/Tangme10/SparseEnd2End/tool/runner/iter_based_runner.py", line 42, in train self.call_hook("after_train_iter") File "/home/qw/Tangme10/SparseEnd2End/tool/runner/base_runner.py", line 249, in call_hook getattr(hook, fn_name)(self) File "/home/qw/Tangme10/SparseEnd2End/tool/hook/evaluation.py", line 267, in after_train_iter self._do_evaluate(runner) File "/home/qw/Tangme10/SparseEnd2End/tool/hook/evaluation.py", line 278, in _do_evaluate key_score = self.evaluate(runner, results) File "/home/qw/Tangme10/SparseEnd2End/tool/hook/evaluation.py", line 365, in evaluate eval_res = self.dataloader.dataset.evaluate( TypeError: evaluate() got an unexpected keyword argument 'logger'

hi, I tried to solve the problem of removing the logger but would get Exception: Error: Invalid box type: None in the second round of training, and eventually I gave up! What do I need to do to resolve the TypeError: evaluate() got an unexpected keyword argument 'logger' issue?

ThomasVonWu commented 2 hours ago

Hi, I’m sorry for the late reply. I have fixed the bug related to the error TypeError: evaluate() got an unexpected keyword argument 'logger' that occurred during evaluation while training. You can see the changes in commit ID: f3268dcb4c4118e0bb8dfd96c30d5475f25e3a3. In addition, the config file dataset/config/sparse4d_temporal_r50_1x1_bs1_256x704_mini.py is used for training/testing and model deployment. Therefore, you will see the nuscenes-mini dataset referenced in the config instead of the full nuscenes dataset. Regarding the error Exception: Error: Invalid box type: None, this occurs due to the instability of the initial training, which prevents the model from predicting valid 3D bounding boxes. To resolve this, I suggest adding the --no-validate argument. For example, you can run the following command:clear && python script/train.py dataset/config/[your_config.py] --no-validate