提交 3e38d1db 编写于 作者: D dongdaxiang

add trainfileswithprofiler for downpour worker

上级 6af697ad
......@@ -115,6 +115,7 @@ class MPISymetricRoleMaker(MPIRoleMaker):
self.node_type_comm_.barrier()
def generate_role(self):
# TODO(guru4elephant): only allow to be called once
self.trainer_endpoints_ = self.get_ips()
self.pserver_endpoints_ = self.get_ips()
......
......@@ -89,6 +89,12 @@ class Fleet(object):
print("You should run DistributedOptimizer.minimize() first")
sys.exit(-1)
def get_worker_num(self):
return self.role_maker_.worker_num()
def get_server_num(self):
return self.role_maker_.server_num()
def is_worker(self):
return self.role_maker_.is_worker()
......@@ -161,3 +167,5 @@ is_worker = fleet_instance.is_worker
is_server = fleet_instance.is_server
init_pserver_model = fleet_instance.init_pserver_model
save_pserver_model = fleet_instance.save_pserver_model
worker_num = fleet_instance.get_worker_num
server_num = fleet_instance.get_server_num
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册