Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Length of names must match number of levels in MultiIndex. #81

Open
Amireux52 opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@Amireux52
Copy link

您好,当我对作者提供的stage2的权重进行test的时候,出现如下问题:
(sparsedrive) cxh@cxh-CVN-Z790D5-GAMING-FROZEN:~/SparseDrive$ sh scripts/test.sh
/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/torch/distributed/launch.py:180: FutureWarning: The module torch.distributed.launch is deprecated
and will be removed in future. Use torchrun.
Note that --use_env is set by default in torchrun.
If your script expects --local_rank argument to be set, please
change it to read from os.environ['LOCAL_RANK'] instead. See
https://pytorch.org/docs/stable/distributed.html#launch-utility for
further instructions

warnings.warn(
/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/mmcv/init.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
warnings.warn(
Use flash_attn_varlen_kvpacked_func
projects.mmdet3d_plugin
work_dir: ./work_dirs/sparsedrive_small_stage2
{'version': 'v1.0-trainval'}
distributed: True
/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/mmdet/models/backbones/resnet.py:401: UserWarning: DeprecationWarning: pretrained is deprecated, please use "init_cfg" instead
warnings.warn('DeprecationWarning: pretrained is deprecated, '
load checkpoint from local path: ckpt/sparsedrive_stage2.pth
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 6019/6019, 7.0 task/s, elapsed: 857s, ETA: 0s{'eval_mode': {'with_det': True, 'with_tracking': True, 'with_map': True, 'with_motion': True, 'with_planning': True, 'tracking_threshold': 0.2, 'motion_threshhold': 0.2}, 'metric': ['bbox']}
All Results write to ./work_dirs/sparsedrive_small_stage2/results.pkl

Formating bboxes of img_bbox
Start to convert detection format...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 6019/6019, 23.3 task/s, elapsed: 258s, ETA: 0s
Results writes to ./work_dirs/sparsedrive_small_stage2/results_nusc.json
Initializing nuScenes detection evaluation
Loaded results from ./work_dirs/sparsedrive_small_stage2/results_nusc.json. Found detections for 6019 samples.
Loading annotations for val split from nuScenes version: v1.0-trainval
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6019/6019 [00:09<00:00, 643.20it/s]
Loaded ground truth annotations for 6019 samples.
Filtering predictions
=> Original number of boxes: 1281935
=> After distance based filtering: 1281335
=> After LIDAR and RADAR points based filtering: 1281335
=> After bike rack filtering: 1280443
Filtering ground truth annotations
=> Original number of boxes: 187528
=> After distance based filtering: 134565
=> After LIDAR and RADAR points based filtering: 121871
=> After bike rack filtering: 121861
Accumulating metric data...
Calculating metrics...
Saving metrics to: ./work_dirs/sparsedrive_small_stage2
mAP: 0.4147
mATE: 0.5596
mASE: 0.2761
mAOE: 0.5294
mAVE: 0.2674
mAAE: 0.1904
NDS: 0.5251
Eval time: 168.1s

Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.636 0.377 0.148 0.073 0.213 0.192
truck 0.321 0.581 0.201 0.113 0.215 0.197
bus 0.370 0.709 0.224 0.138 0.478 0.266
trailer 0.110 0.901 0.271 0.662 0.221 0.045
construction_vehicle 0.084 0.934 0.508 1.374 0.134 0.409
pedestrian 0.514 0.560 0.290 0.606 0.331 0.167
motorcycle 0.434 0.517 0.262 0.698 0.411 0.241
bicycle 0.426 0.410 0.261 0.988 0.137 0.006
traffic_cone 0.682 0.271 0.315 nan nan nan
barrier 0.572 0.336 0.282 0.113 nan nan

Formating bboxes of img_bbox
Start to convert detection format...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 6019/6019, 128.3 task/s, elapsed: 47s, ETA: 0s
Results writes to ./work_dirs/sparsedrive_small_stage2/results_nusc.json

Loading NuScenes tables for version v1.0-trainval...
23 category,
8 attribute,
4 visibility,
64386 instance,
12 sensor,
10200 calibrated_sensor,
2631083 ego_pose,
68 log,
850 scene,
34149 sample,
2631083 sample_data,
1166187 sample_annotation,
4 map,
Done loading in 32.994 seconds.

Reverse indexing ...
Done reverse indexing in 7.8 seconds.

Initializing nuScenes tracking evaluation
Loaded results from ./work_dirs/sparsedrive_small_stage2/results_nusc.json. Found detections for 6019 samples.
Loading annotations for val split from nuScenes version: v1.0-trainval
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6019/6019 [00:07<00:00, 832.91it/s]
Loaded ground truth annotations for 6019 samples.
Filtering tracks
=> Original number of boxes: 150815
=> After distance based filtering: 150797
=> After LIDAR and RADAR points based filtering: 150797
=> After bike rack filtering: 150596
Filtering ground truth tracks
=> Original number of boxes: 142261
=> After distance based filtering: 103564
=> After LIDAR and RADAR points based filtering: 93885
=> After bike rack filtering: 93875
Accumulating metric data...
Computing metrics for class car...

Traceback (most recent call last):
File "./tools/test.py", line 325, in
main()
File "./tools/test.py", line 317, in main
results_dict = dataset.evaluate(outputs, **eval_kwargs)
File "/home/cxh/SparseDrive/projects/mmdet3d_plugin/datasets/nuscenes_3d_dataset.py", line 850, in evaluate
ret_dict = self._evaluate_single(
File "/home/cxh/SparseDrive/projects/mmdet3d_plugin/datasets/nuscenes_3d_dataset.py", line 581, in _evaluate_single
metrics = nusc_eval.main()
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/nuscenes/eval/tracking/evaluate.py", line 204, in main
metrics, metric_data_list = self.evaluate()
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/nuscenes/eval/tracking/evaluate.py", line 135, in evaluate
accumulate_class(class_name)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/nuscenes/eval/tracking/evaluate.py", line 131, in accumulate_class
curr_md = curr_ev.accumulate()
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/nuscenes/eval/tracking/algo.py", line 123, in accumulate
thresholds, recalls = self.compute_thresholds(gt_box_count)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/nuscenes/eval/tracking/algo.py", line 308, in compute_thresholds
_, scores = self.accumulate_threshold(threshold=None)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/nuscenes/eval/tracking/algo.py", line 278, in accumulate_threshold
events = acc.events.loc[frame_id]
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/nuscenes/eval/tracking/mot.py", line 61, in events
self.cached_events_df = MOTAccumulatorCustom.new_event_dataframe_with_data(self._indices, self._events)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/nuscenes/eval/tracking/mot.py", line 36, in new_event_dataframe_with_data
idx = pd.MultiIndex.from_tuples(indices, names=['FrameId', 'Event'])
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/pandas/core/indexes/multi.py", line 507, in from_tuples
return MultiIndex.from_arrays(arrays, sortorder=sortorder, names=names)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/pandas/core/indexes/multi.py", line 443, in from_arrays
return MultiIndex(
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/pandas/core/indexes/multi.py", line 284, in new
result._set_names(names)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/pandas/core/indexes/multi.py", line 1349, in _set_names
raise ValueError(
ValueError: Length of names must match number of levels in MultiIndex.
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 1787005) of binary: /home/cxh/anaconda3/envs/sparsedrive/bin/python3
Traceback (most recent call last):
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/torch/distributed/launch.py", line 195, in
main()
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/torch/distributed/launch.py", line 191, in main
launch(args)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/torch/distributed/launch.py", line 176, in launch
run(args)
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/torch/distributed/run.py", line 753, in run
elastic_launch(
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 132, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/cxh/anaconda3/envs/sparsedrive/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 246, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:

./tools/test.py FAILED

Failures:
<NO_OTHER_FAILURES>

Root Cause (first observed failure):
[0]:
time : 2024-12-12_17:01:02
host : cxh-CVN-Z790D5-GAMING-FROZEN
rank : 0 (local_rank: 0)
exitcode : 1 (pid: 1787005)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html

我尝试过升级pands,但是还是报错,请问这该如何解决呢,盼复,谢谢啦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant