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

评估代码在910上报hw_scale错误 #258

Open
iamzjs opened this issue Jan 2, 2024 · 1 comment
Open

评估代码在910上报hw_scale错误 #258

iamzjs opened this issue Jan 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@iamzjs
Copy link

iamzjs commented Jan 2, 2024

我用的命令: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.

@zhanghuiyao
Copy link
Collaborator

这个看起来应该是数据处理问题,已在PR 257 中修复,可以更新代码试下

@zhanghuiyao zhanghuiyao added the bug Something isn't working label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants