From 782aa01fb5df465a6fd0a8d5bfef967956895489 Mon Sep 17 00:00:00 2001 From: Matthew Altenburg Date: Tue, 1 Oct 2024 13:11:08 +1000 Subject: [PATCH] Fix progress bar new line issue in create_progress_bar - Removed the trailing newline character (\n) from bar_format in tqdm. - This ensures the progress bar remains on the same line during updates, improving terminal output readability. --- torchtnt/utils/tqdm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchtnt/utils/tqdm.py b/torchtnt/utils/tqdm.py index 40443bba9b..72d98a91c5 100644 --- a/torchtnt/utils/tqdm.py +++ b/torchtnt/utils/tqdm.py @@ -49,7 +49,7 @@ def create_progress_bar( desc=f"{desc} {current_epoch}", total=total, initial=num_steps_completed, - bar_format="{l_bar}{bar}{r_bar}\n", + bar_format="{l_bar}{bar}{r_bar}", file=file, )