Unset https_proxy and http_proxy in our launch.py (#17915)

dependabot/pip/python/requests-2.20.0
gongweibao 6 years ago committed by GitHub
parent 5df65e506d
commit f3e5a5cf67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -173,7 +173,11 @@ def start_procs(args):
"PADDLE_CURRENT_ENDPOINT":
"%s:%d" % (current_node_ip, args.started_port + i),
"PADDLE_TRAINERS_NUM": "%d" % nranks,
"PADDLE_TRAINER_ENDPOINTS": trainers_endpoints
"PADDLE_TRAINER_ENDPOINTS": trainers_endpoints,
# paddle broadcast ncclUniqueId use socket, and
# proxy maybe make trainers unreachable, so set them to ""
"http_proxy": "",
"https_proxy": ""
})
cmd = [sys.executable, "-u", args.training_script
@ -182,6 +186,7 @@ def start_procs(args):
cmds.append(cmd)
if args.log_dir is not None:
os.system("mkdir -p {}".format(args.log_dir))
fn = open("%s/workerlog.%d" % (args.log_dir, i), "w")
log_fns.append(fn)

@ -8,7 +8,7 @@ python -m paddle.distributed.launch multi_process.py
cluster_node_ips="127.0.0.1"
node_ip="127.0.0.1"
distributed_args="--cluster_node_ips ${cluster_node_ips} --node_ip ${node_ip} --selected_gpus=0,1"
distributed_args="--cluster_node_ips ${cluster_node_ips} --node_ip ${node_ip} --selected_gpus=0,1 --log_dir testlog"
python -m paddle.distributed.launch ${distributed_args} multi_process.py
str1="selected_gpus:0 worker_endpoints:['127.0.0.1:6170', '127.0.0.1:6171'] trainers_num:2 current_endpoint:127.0.0.1:6170 trainer_id:0"

Loading…
Cancel
Save