facebookresearch / detr

End-to-End Object Detection with Transformers
Apache License 2.0
13.08k stars 2.37k forks source link

what exact command you run:FutureWarning: The module torch.distributed.launch is deprecated #578

Open 123456hxh opened 1 year ago

123456hxh commented 1 year ago

I ran into a problem, I tried a lot of things, but I still couldn't solve it. I would be very grateful if I could answer it. 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

123456hxh commented 1 year ago

@123456hxh When I perform“python -m torch.distributed.launch --nproc_per_node=8 --use_env main.py --coco_path /path/to/coco”

Anne-Andresen commented 9 months ago

Many has resorted to using torchrun as an alternative to torch.distributed.launch however if you use an older version such as before v1.10 then torch.distributed.run can be used.