PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

AttributeError: module 'ppdet.data.source' has no attribute 'test'

Open john09282922 opened this issue 1 year ago • 1 comments

问题确认 Search before asking

  • [X] 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

Bug组件 Bug Component

Training

Bug描述 Describe the Bug

====================================================================== ERROR: test_trainer (main.TestYolov3)

Traceback (most recent call last): File "/home/user/test1/PaddleDetection-develop/ppdet/modeling/tests/test_architectures.py", line 35, in test_trainer trainer = ppdet.engine.Trainer(cfg, mode='test') File "/home/user/.conda/envs/paddle2/lib/python3.9/site-packages/paddledet-2.6.0-py3.9.egg/ppdet/engine/trainer.py", line 86, in init self.dataset = self.cfg['{}Dataset'.format(capital_mode)] = create( File "/home/user/.conda/envs/paddle2/lib/python3.9/site-packages/paddledet-2.6.0-py3.9.egg/ppdet/core/workspace.py", line 292, in create return cls(**cls_kwargs) File "/home/user/.conda/envs/paddle2/lib/python3.9/site-packages/paddledet-2.6.0-py3.9.egg/ppdet/data/source/dataset.py", line 279, in init self.dataset = getattr(source, type)(**dataset_args) AttributeError: module 'ppdet.data.source' has no attribute 'test'


Ran 7 tests in 1.702s

FAILED (errors=5)

using test.py

复现环境 Environment

-OS:Linux -version: paddle 2.5.0-gpu -cuda 11.2 ~ 12.0 make same problem

Bug描述确认 Bug description confirmation

  • [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • [X] 我愿意提交PR!I'd like to help by submitting a PR!

john09282922 avatar Jul 29 '23 01:07 john09282922

您好,是否解决问题,我也遇见同样问题。

yanyide123 avatar Sep 15 '23 01:09 yanyide123

怎么使用的 有相关的命令嘛

lyuwenyu avatar Mar 04 '24 08:03 lyuwenyu