open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
29.45k stars 9.43k forks source link

运行sh ./tools/dist_train.sh ${CONFIG_FILE} ${GPU_NUM}命令后报错 #7876

Closed billfjj closed 2 years ago

billfjj commented 2 years ago

(swin_det) amax@admin:~/LJW/swin_transformer/Swin-Transformer-Object-Detection$ sh ./tools/dist_train.sh configs/swin/cascade_mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco.py 3 : not foundt_train.sh: 2: : not foundt_train.sh: 6: : not foundt_train.sh: 7:


Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.


': [Errno 2] No such file or directory/python: can't open file ' Killing subprocess 1260353 Killing subprocess 1260354 ': [Errno 2] No such file or directory/python: can't open file ' Killing subprocess 1260355 Traceback (most recent call last): File "/home/amax/anaconda3/envs/swin_det/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/amax/anaconda3/envs/swin_det/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/amax/anaconda3/envs/swin_det/lib/python3.8/site-packages/torch/distributed/launch.py", line 340, in main() File "/home/amax/anaconda3/envs/swin_det/lib/python3.8/site-packages/torch/distributed/launch.py", line 326, in main sigkill_handler(signal.SIGTERM, None) # not coming back File "/home/amax/anaconda3/envs/swin_det/lib/python3.8/site-packages/torch/distributed/launch.py", line 301, in sigkill_handler raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd) subprocess.CalledProcessError: Command '['/home/amax/anaconda3/envs/swin_det/bin/python', '-u', '\r', '--local_rank=2']' returned non-zero exit status 2. ./tools/dist_train.sh: 9: Bad substitution

mm-assistant[bot] commented 2 years ago

Please use English or English & Chinese for issues so that we could have broader discussion.

BIGWangYuDong commented 2 years ago

You can try to use ./tools/dist_train.sh configs/swin/cascade_mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco.py 3 to start your task or sh tools/dist_train.sh xxxx

billfjj commented 2 years ago

I tried and another error was reported. (swin_det) amax@admin:~/LJW/swin_transformer/Swin-Transformer-Object-Detection$ ./tools/dist_train.sh configs/swin/cascade_mask_rcnn_swin_tiny_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco.py 4 /usr/bin/env: ‘bash\r’: No such file or directory

BIGWangYuDong commented 2 years ago

Seem this is an teriminal error,

billfjj commented 2 years ago

Do I need to change the code in dist_train.sh?

BIGWangYuDong commented 2 years ago

I don't think so, Try to follow this: https://stackoverflow.com/questions/29045140/env-bash-r-no-such-file-or-directory