提交 c28c66cd 编写于 作者: Q qjing666

remove print in api

上级 a561cc11
...@@ -104,10 +104,7 @@ class FLScheduler(object): ...@@ -104,10 +104,7 @@ class FLScheduler(object):
def start_fl_training(self): def start_fl_training(self):
# loop until training is done # loop until training is done
loop = 0
while True: while True:
if loop <= 1:
print(loop)
random.shuffle(self.fl_workers) random.shuffle(self.fl_workers)
worker_dict = {} worker_dict = {}
for worker in self.fl_workers[:self.sample_worker_num]: for worker in self.fl_workers[:self.sample_worker_num]:
......
...@@ -43,8 +43,6 @@ try: ...@@ -43,8 +43,6 @@ try:
rng = RAND_bytes rng = RAND_bytes
except(AttributeError, ImportError): except(AttributeError, ImportError):
rng = os.urandom rng = os.urandom
#raise RNGError
#python2
class DiffieHellman: class DiffieHellman:
""" """
......
...@@ -90,12 +90,12 @@ class FLTrainer(object): ...@@ -90,12 +90,12 @@ class FLTrainer(object):
# TODO(guru4elephant): add connection with master # TODO(guru4elephant): add connection with master
if self.cur_step != 0: if self.cur_step != 0:
while not self.agent.finish_training(): while not self.agent.finish_training():
print('wait others finish') self._logger.debug("Wait others finish")
continue continue
while not self.agent.can_join_training(): while not self.agent.can_join_training():
print("wait permit") self._logger.debug("Wait permit")
continue continue
print("ready to train") self._logger.debug("Ready to train")
return False return False
...@@ -124,7 +124,6 @@ class FedAvgTrainer(FLTrainer): ...@@ -124,7 +124,6 @@ class FedAvgTrainer(FLTrainer):
self.exe.run(self._recv_program) self.exe.run(self._recv_program)
epoch = 0 epoch = 0
for i in range(num_epoch): for i in range(num_epoch):
print(epoch)
for data in reader(): for data in reader():
self.exe.run(self._main_program, self.exe.run(self._main_program,
feed=feeder.feed(data), feed=feeder.feed(data),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册