From 2ee33c0d40f1d2a10bae96337e8e0c212f10ff6c Mon Sep 17 00:00:00 2001 From: Feng Ni Date: Fri, 8 Apr 2022 11:35:14 +0800 Subject: [PATCH] revert det tqdm eval (#5619) * revert det tqdm eval, test=document_fix * revert det tqdm eval, test=document_fix --- ppdet/engine/callbacks.py | 4 ++++ ppdet/engine/trainer.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ppdet/engine/callbacks.py b/ppdet/engine/callbacks.py index 1c906320b..77ca94602 100644 --- a/ppdet/engine/callbacks.py +++ b/ppdet/engine/callbacks.py @@ -141,6 +141,10 @@ class LogPrinter(Callback): dtime=str(data_time), ips=ips) logger.info(fmt) + if mode == 'eval': + step_id = status['step_id'] + if step_id % 100 == 0: + logger.info("Eval iter: {}".format(step_id)) def on_epoch_end(self, status): if dist.get_world_size() < 2 or dist.get_rank() == 0: diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index cda3e6823..35e1b9710 100644 --- a/ppdet/engine/trainer.py +++ b/ppdet/engine/trainer.py @@ -501,7 +501,7 @@ class Trainer(object): flops_loader = create('{}Reader'.format(self.mode.capitalize()))( self.dataset, self.cfg.worker_num, self._eval_batch_sampler) self._flops(flops_loader) - for step_id, data in enumerate(tqdm(loader)): + for step_id, data in enumerate(loader): self.status['step_id'] = step_id self._compose_callback.on_step_begin(self.status) # forward -- GitLab