ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 2) local_rank: 0 (pid: 35585)

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 
train.py: error: unrecognized arguments: --local_rank=0
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 2) local_rank: 0 (pid: 35585) of binary: /home/lvying/anaconda3/envs/sigma/bin/python
 

NCCL_P2P_DISABLE=1 CUDA_VISIBLE_DEVICES="0,1" python -m torch.distributed.launch --nproc_per_node=2  --master_port 29502 train.py -p 29502 -d 0,1

08 13:14:46 PyTorch Version 1.13.1+cu117
usage: train.py [-h] [-d DEVICES] [-c FILE] [--local-rank LOCAL_RANK] [-p PORT] [--dataset_name DATASET_NAME]

       Solution:

after torch1.9,use torchrun!!!

CUDA_VISIBLE_DEVICES="0,1" torchrun --nproc_per_node=2  --master_port 29502 train.py -p 29502 -d 0,1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值