OpenGait icon indicating copy to clipboard operation
OpenGait copied to clipboard

Train a model by "python -m torch.distributed.launch --nproc_per_node=2 opengait/main.py --cfgs ./config/baseline/baseline.yaml --phase train"

Open zhang123-sys opened this issue 3 years ago • 15 comments

image

zhang123-sys avatar Jul 29 '22 12:07 zhang123-sys

subprocess.CalledProcessError: Command '['C:\Users\AppData\Local\Programs\Python\Python37\python.exe', '-u', 'opengait/main.py', '--local_rank=1', '--cfgs', './config/baseline/baseline.yaml', '--phase', 'train']' returned non-zero exit status 1.

zhang123-sys avatar Jul 29 '22 12:07 zhang123-sys

We highly recommend that users use Linux rather than Windows, since we haven't evaluated our framework on the Windows platform.

chuanfushen avatar Aug 01 '22 05:08 chuanfushen

We highly recommend that users use Linux rather than Windows, since we haven't evaluated our framework on the Windows platform.

Ok, I use Linux, but get a similar output.

zhang123-sys avatar Aug 01 '22 05:08 zhang123-sys

Do you have two GPU cards or just one?

darkliang avatar Aug 01 '22 05:08 darkliang

on one

zhang123-sys avatar Aug 01 '22 05:08 zhang123-sys

You can try --nproc_per_node=1.

darkliang avatar Aug 01 '22 05:08 darkliang

--nproc_per_node=1

Ok, which file to modify?

zhang123-sys avatar Aug 01 '22 05:08 zhang123-sys

--nproc_per_node=1

Ok, which file to modify?

The running command.

darkliang avatar Aug 01 '22 06:08 darkliang

--nproc_per_node=1

Ok, which file to modify?

The running command.

Thank you.

zhang123-sys avatar Aug 01 '22 06:08 zhang123-sys

image

zhang123-sys avatar Aug 01 '22 06:08 zhang123-sys

Traceback (most recent call last): File "opengait/main.py", line 6, in from modeling import models File "/hy-nas/OpenGait/opengait/modeling/models/init.py", line 8, in for (_, module_name, _) in iter_modules([package_dir]): File "/usr/lib/python3.8/pkgutil.py", line 129, in iter_modules for i in importers: File "/usr/lib/python3.8/pkgutil.py", line 419, in get_importer importer = path_hook(path_item) File "", line 1594, in path_hook_for_FileFinder File "", line 1469, in init File "", line 177, in _path_isabs AttributeError: 'PosixPath' object has no attribute 'startswith'

zhang123-sys avatar Aug 01 '22 06:08 zhang123-sys

I guess it is related to python version, try to update to python3.9

chuanfushen avatar Aug 01 '22 07:08 chuanfushen

I guess it is related to python version, try to update to python3.9

Ok

zhang123-sys avatar Aug 01 '22 07:08 zhang123-sys

@zhang123-sys hi zhang, have you solved this issue?

chuanfushen avatar Aug 07 '22 10:08 chuanfushen

@zhang123-sys hi zhang, have you solved this issue?

Not yet. A new problem "AttributeError: 'PosixPath' object has no attribute 'startswith'", please help me. image

zhang123-sys avatar Aug 14 '22 01:08 zhang123-sys

as I said before, try to upgrade to python39 or downgrade to python36

chuanfushen avatar Aug 18 '22 04:08 chuanfushen

image

upgrade to python39

upgrade to python39, but problem "AttributeError: 'PosixPath' object has no attribute 'startswith'" exist

zhang123-sys avatar Sep 10 '22 01:09 zhang123-sys

Generally, changing the python version can solve this issue, but this issue has nothing to do with OpenGait, so I close it.

darkliang avatar Oct 11 '22 09:10 darkliang

你好,这个问题我昨天在恒源云训练机器时候遇到过,最后解决,大概率是因为python3.8的问题导致的bug, 在这里我提供我自己的解决方式,希望对你有帮助!: 到目录/lib/python3.8/pkgutli.py下找到: try: importer = sys.path_importer_cache[path_item] 在这段话前面添加一行: path_item = os.fsdecode(path_item) image

即可解决。

HUAFOR avatar Feb 17 '23 09:02 HUAFOR