评估代码在910上报hw_scale错误
Closed this issue · 1 comments
我用的命令:python test.py --config ./configs/yolov5/yolov5n.yaml --weight ./yolov5n.ckpt
--device_target Ascend
定位在这一行: File "/home/ma-user/work/mindyolo/mindyolo/data/dataset.py", line 1183, in test_collate_fn
hw_scale = [sample.pop('hw_scale') for sample in batch_samples]
日志如下:
Traceback (most recent call last):
File "test.py", line 511, in
main(args)
File "test.py", line 502, in main
synchronizer=Synchronizer(args.rank_size) if args.rank_size > 1 else None,
File "test.py", line 121, in test
return test_detect(**kwargs)
File "test.py", line 159, in test_detect
for i, data in enumerate(loader):
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/dataset/engine/iterators.py", line 145, in next
data = self._get_next()
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/dataset/engine/iterators.py", line 270, in _get_next
raise err
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/dataset/engine/iterators.py", line 253, in _get_next
return {k: self._transform_md_to_output(t) for k, t in self._iterator.GetNextAsMap().items()}
RuntimeError: Exception thrown from user defined Python function in dataset.
- Python Call Stack:
KeyError: Traceback (most recent call last):
File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.7/site-packages/mindspore/dataset/transforms/py_transforms_util.py", line 198, in call
result = self.transform(*args)
File "/home/ma-user/work/mindyolo/mindyolo/data/dataset.py", line 1183, in test_collate_fn
hw_scale = [sample.pop('hw_scale') for sample in batch_samples]
File "/home/ma-user/work/mindyolo/mindyolo/data/dataset.py", line 1183, in
hw_scale = [sample.pop('hw_scale') for sample in batch_samples]
KeyError: 'hw_scale'
- Dataset Pipeline Error Message:
[ERROR] Execute user Python code failed, check 'Python Call Stack' above.
这个看起来应该是数据处理问题,已在PR 257 中修复,可以更新代码试下