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

doesn't contains class named 'Config #156

Open
4 tasks done
HongyeCao opened this issue Oct 29, 2024 · 1 comment
Open
4 tasks done

doesn't contains class named 'Config #156

HongyeCao opened this issue Oct 29, 2024 · 1 comment
Labels
question Further information is requested

Comments

@HongyeCao
Copy link

Before Asking

  • I have read the README carefully. 我已经仔细阅读了README上的操作指引。

  • I want to train my custom dataset, and I have read the tutorials for finetune on your data carefully and organize my dataset correctly; 我想训练自定义数据集,我已经仔细阅读了训练自定义数据的教程,以及按照正确的目录结构存放数据集。

  • I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。

Search before asking

  • I have searched the DAMO-YOLO issues and found no similar questions.

Question

执行命令python -m torch.distributed.launch --nproc_per_node=1 tools/train.py -f mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py后出现下列信息

/root/miniconda3/envs/DAMO-YOLO/lib/python3.7/site-packages/torch/distributed/launch.py:188: 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

FutureWarning,
2024-10-29 07:50:02.125 | ERROR | main::68 - An error has been caught in function '', process 'MainProcess' (27532), thread 'MainThread' (139870530041664):
Traceback (most recent call last):

File "/mnt/damo-yolo/damo/config/base.py", line 123, in get_config_by_file
os.path.basename(config_file).split('.')[0])
│ │ │ └ 'mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py'
│ │ └ <function basename at 0x7f362523cef0>
│ └ <module 'posixpath' from '/root/miniconda3/envs/DAMO-YOLO/lib/python3.7/posixpath.py'>
└ <module 'os' from '/root/miniconda3/envs/DAMO-YOLO/lib/python3.7/os.py'>

File "/root/miniconda3/envs/DAMO-YOLO/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'damoyolo_tinynasL45_L'
│ └ <function _gcd_import at 0x7f3625368b00>
└ <module 'importlib._bootstrap' (frozen)>
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'damoyolo_tinynasL45_L'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "tools/train.py", line 68, in
main()
└ <function main at 0x7f3625267d40>

File "tools/train.py", line 56, in main
config = parse_config(args.config_file)
│ │ └ 'mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py'
│ └ Namespace(config_file='mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py', local_rank=0, opts=[], tea_ckpt=None, tea_config=None)
└ <function parse_config at 0x7f358132eb90>

File "/mnt/damo-yolo/damo/config/base.py", line 139, in parse_config
return get_config_by_file(config_file)
│ └ 'mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py'
└ <function get_config_by_file at 0x7f358131d320>

File "/mnt/damo-yolo/damo/config/base.py", line 127, in get_config_by_file
"{} doesn't contains class named 'Config'".format(config_file))
└ 'mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py'

ImportError: mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py doesn't contains class named 'Config'

Additional

No response

@HongyeCao HongyeCao added the question Further information is requested label Oct 29, 2024
@ksv87
Copy link

ksv87 commented Nov 2, 2024

try torchrun tools/train.py -f mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py
also may be you need path /mnt/damo-yolo/configs/damoyolo_tinynasL45_L.py ?
or use relative path torchrun tools/train.py -f configs/damoyolo_tinynasL45_L.py

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

No branches or pull requests

2 participants