Skip to content

Commit 493d78a

Browse files
committed
minor fix
1 parent d47f36a commit 493d78a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

utils/stats.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ def print_stats(self):
160160
# Print initial, average, final, and max memory usage
161161
logging.info("System stats:")
162162
if cpu_res is not None:
163-
logging.info(f"\tInitial CPU memory usage: {self.initial_cpu_res:.2f} MB", flush=True)
164-
logging.info(f"\tAverage CPU memory usage: {self.avg_cpu_res:.2f} MB", flush=True)
165-
logging.info(f"\tFinal CPU memory usage: {cpu_res:.2f} MB", flush=True)
166-
logging.info(f"\tMax CPU memory usage: {self.max_cpu_res:.2f} MB", flush=True)
163+
logging.info(f"\tInitial CPU memory usage: {self.initial_cpu_res:.2f} MB")
164+
logging.info(f"\tAverage CPU memory usage: {self.avg_cpu_res:.2f} MB")
165+
logging.info(f"\tFinal CPU memory usage: {cpu_res:.2f} MB")
166+
logging.info(f"\tMax CPU memory usage: {self.max_cpu_res:.2f} MB")
167167

168168
if gpu_res is not None:
169169
for gpu_id, g_res in enumerate(gpu_res):
170-
logging.info(f"\tInitial GPU {gpu_id} memory usage: {self.initial_gpu_res[gpu_id]:.2f} MB", flush=True)
171-
logging.info(f"\tAverage GPU {gpu_id} memory usage: {self.avg_gpu_res[gpu_id]:.2f} MB", flush=True)
172-
logging.info(f"\tFinal GPU {gpu_id} memory usage: {g_res:.2f} MB", flush=True)
173-
logging.info(f"\tMax GPU {gpu_id} memory usage: {self.max_gpu_res[gpu_id]:.2f} MB", flush=True)
170+
logging.info(f"\tInitial GPU {gpu_id} memory usage: {self.initial_gpu_res[gpu_id]:.2f} MB")
171+
logging.info(f"\tAverage GPU {gpu_id} memory usage: {self.avg_gpu_res[gpu_id]:.2f} MB")
172+
logging.info(f"\tFinal GPU {gpu_id} memory usage: {g_res:.2f} MB")
173+
logging.info(f"\tMax GPU {gpu_id} memory usage: {self.max_gpu_res[gpu_id]:.2f} MB")

0 commit comments

Comments
 (0)