diff --git a/paddlex/inference/models/base/basic_predictor.py b/paddlex/inference/models/base/basic_predictor.py index ee2c7b3223..ee13fb5682 100644 --- a/paddlex/inference/models/base/basic_predictor.py +++ b/paddlex/inference/models/base/basic_predictor.py @@ -68,7 +68,15 @@ def __call__(self, input, **kwargs): ) break self.benchmark.warmup_stop(warmup_num) - output = list(super().__call__(input)) + logging.info("Warmup Done!") + # TODO(gaotingquan): after supporting batcher to batch input + import batch + from tqdm import tqdm + + batched_input = batch(input) + output = [] + for res in tqdm(super(batched_input).__call__(), total=len(batched_input)): + output.append(res) self.benchmark.collect(len(output)) else: yield from super().__call__(input)