From 43f6c70f5e5cb1575d6823fea14dcd83a3fa0a1d Mon Sep 17 00:00:00 2001 From: Jiangxinz Date: Tue, 8 Jun 2021 10:22:36 +0800 Subject: [PATCH] Add 'self' parameters to function Cluster::update_pods, use variable name 'cur_proxy' instead of 'proxy' in file 'tools/get_pr_ut.py' (#33377) * undefined variable proxy * Cluster::update_pods lacks of parameter self --- python/paddle/distributed/utils.py | 2 +- tools/get_pr_ut.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/distributed/utils.py b/python/paddle/distributed/utils.py index 7fb55239c0..9c56534095 100644 --- a/python/paddle/distributed/utils.py +++ b/python/paddle/distributed/utils.py @@ -166,7 +166,7 @@ class Cluster(object): def __ne__(self, cluster): return not self.__eq__(cluster) - def update_pods(cluster): + def update_pods(self, cluster): self.pods = copy.copy(cluster.pods) def trainers_nranks(self): diff --git a/tools/get_pr_ut.py b/tools/get_pr_ut.py index 78d9978c4b..109aa1c3bb 100644 --- a/tools/get_pr_ut.py +++ b/tools/get_pr_ut.py @@ -112,7 +112,7 @@ class PRChecker(object): print(e) print( 'PREC download {} error, retry {} time(s) after {} secs.[proxy_option={}]'. - format(url, ix, ix * 10, proxy)) + format(url, ix, ix * 10, cur_proxy)) continue else: return True -- GitLab