-
-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Description
Search before asking
- I have searched the YOLOv5 issues and discussions and found no similar questions.
Question
I want to use the multi-GPU to get faster inference time. When I use the comand: python -m torch.distributed.launch --nproc_per_node 2 val.py, there is a bug occur.
usage: val.py [-h] [--data DATA] [--weights WEIGHTS [WEIGHTS ...]] [--batch-size BATCH_SIZE] [--imgsz IMGSZ] [--conf-thres CONF_THRES] [--iou-thres IOU_THRES] [--task TASK] [--device DEVICE] [--workers WORKERS] [--single-cls] [--augment] [--verbose] [--save-txt] [--save-hybrid]
[--save-conf] [--save-json] [--project PROJECT] [--name NAME] [--exist-ok] [--half] [--dnn]
val.py: error: unrecognized arguments: --local_rank=1
usage: val.py [-h] [--data DATA] [--weights WEIGHTS [WEIGHTS ...]] [--batch-size BATCH_SIZE] [--imgsz IMGSZ] [--conf-thres CONF_THRES] [--iou-thres IOU_THRES] [--task TASK] [--device DEVICE] [--workers WORKERS] [--single-cls] [--augment] [--verbose] [--save-txt] [--save-hybrid]
[--save-conf] [--save-json] [--project PROJECT] [--name NAME] [--exist-ok] [--half] [--dnn]
val.py: error: unrecognized arguments: --local_rank=0
Traceback (most recent call last):
File "/home/ubuntu/.conda/envs/yolov5_obb/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/ubuntu/.conda/envs/yolov5_obb/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/ubuntu/.conda/envs/yolov5_obb/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in
main()
File "/home/ubuntu/.conda/envs/yolov5_obb/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/home/ubuntu/.conda/envs/yolov5_obb/bin/python', '-u', 'val.py', '--local_rank=1']' returned non-zero exit status 2.
I want to request how to use val.py with multi-GPU?
Additional
No response