question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect log position

See original GitHub issue

🐛 Bug description

When {bar} is removed from bar_format of argument of ProgressBar, immediate logger output does not print in newline.

Screen Shot 2020-06-03 at 3 58 28 PM

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")
Screen Shot 2020-06-03 at 4 08 55 PM

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Yevgnencommented, Jun 3, 2020

@vfdev-5 You are always fast 😃

0reactions
liebknecommented, Jun 5, 2020

I have a similar issue, when handlers for Events.ITERATION_COMPLETED which lies between Events.EPOCH_STARTED and Events.EPOCH_COMPLETED output logs(e.g., adjust lr based on iteration and output a info message like lr adjusted to ...), they come after the progress bar if the {bar} is hidden.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crystal Report: Unable to connect incorrect log on parameters
c# - Crystal Report: Unable to connect incorrect log on parameters - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing ......
Read more >
HOS log location incorrect due to Malfunction Manual Position?
Check if HOS Log Edit page has the "Malfunction manual position " by clicking at the individual log. Check the Engine Faults during...
Read more >
Never Arrange the Fake Logs in Your Gas Fireplace
Another consequence of incorrect log placement is the increase in sooting. Too much soot decreases the functionality of your fireplace and ...
Read more >
Unable to read master log position while setting up MySQL slave
I have then logged into my slave DB with phpMyAdmin and tried to connect it as a slave. When I enter in the...
Read more >
Crystal Reports 9 Unable to connect: incorrect log on ...
We have seen this error under several different conditions. The two things that have resoleved the problem are: 1. do a verify database...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found