OpenGait
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"

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.
We highly recommend that users use Linux rather than Windows, since we haven't evaluated our framework on the Windows platform.
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.
Do you have two GPU cards or just one?
on one
You can try --nproc_per_node=1.
--nproc_per_node=1
Ok, which file to modify?
--nproc_per_node=1
Ok, which file to modify?
The running command.
--nproc_per_node=1
Ok, which file to modify?
The running command.
Thank you.

Traceback (most recent call last):
File "opengait/main.py", line 6, in
I guess it is related to python version, try to update to python3.9
I guess it is related to python version, try to update to python3.9
Ok
@zhang123-sys hi zhang, have you solved this issue?
@zhang123-sys hi zhang, have you solved this issue?
Not yet.
A new problem "AttributeError: 'PosixPath' object has no attribute 'startswith'", please help me.

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

upgrade to python39
upgrade to python39, but problem "AttributeError: 'PosixPath' object has no attribute 'startswith'" exist
Generally, changing the python version can solve this issue, but this issue has nothing to do with OpenGait, so I close it.
你好,这个问题我昨天在恒源云训练机器时候遇到过,最后解决,大概率是因为python3.8的问题导致的bug,
在这里我提供我自己的解决方式,希望对你有帮助!:
到目录/lib/python3.8/pkgutli.py下找到:
try:
importer = sys.path_importer_cache[path_item]
在这段话前面添加一行:
path_item = os.fsdecode(path_item)

即可解决。