-
-
Notifications
You must be signed in to change notification settings - Fork 692
Incorrect log position #1098
Copy link
Copy link
Closed
Labels
Description
🐛 Bug description
When {bar} is removed from bar_format of argument of ProgressBar, immediate logger output does not print in newline.
Add
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
to beginning of mnist_with_tqdm_logger.py and change this line to
pbar = ProgressBar(
persist=True, bar_format="{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{postfix} [{elapsed}<{remaining}]",
)
This seems not happen to very small example
import logging
import time
import tqdm
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.info("before")
for i in tqdm.tqdm(
range(3),
leave=True,
bar_format="{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{postfix} [{elapsed}<{remaining}]",
):
time.sleep(0.5)
logger.info("after")Note that the leave argument in tqdm corresponds to the persist in ProgressBar.
Environment
- PyTorch Version (e.g., 1.4): 1.5.0
- Ignite Version (e.g., 0.3.0):
2d30d1d - OS (e.g., Linux): macOS 10.15.5
- How you installed Ignite (
conda,pip, source): source - Python version: 3.7.5
- Any other relevant information: None
Reactions are currently unavailable

