赞
踩
完整报错为:ValueError: Error initializing torch.distributed using env:// rendezvous: environment variable MASTER_ADDR expected, but not set
在代码中使用:
import os
os.environ['MASTER_ADDR'] = 'localhost'
os.environ['MASTER_PORT'] = '5678'
如果是运行命令行的,可以使用:
export MASTER_ADDR=localhost
export MASTER_PORT=5678
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。