Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

progress reporting often prints multiple lines #207

Open
jburos opened this issue May 18, 2017 · 2 comments
Open

progress reporting often prints multiple lines #207

jburos opened this issue May 18, 2017 · 2 comments
Labels

Comments

@jburos
Copy link
Member

jburos commented May 18, 2017

Often, tqdm prints progress bars on multiple lines and it can be annoying to scroll through.

This can happen in a trivial fashion, where there is occasionally a single line break in the middle of the progress reporting:

screen shot 2017-05-18 at 2 10 00 pm

You will notice in this case that there is a new linebreak for each warning / info or print statement. Depending on your perspective, this might be an annoyance (bug), or a feature (to alert you to how frequently the warnings occur and/or for which records).

But we are also seeing another, more obviously incorrect scenario where each new update to the progress prints on a new line. Here is an example using the same cohort as above but a different summary function.

screen shot 2017-05-18 at 2 11 29 pm

(here shown with output truncated, for obvious reasons).

My first hypothesis about this bug is that there is some output being printed from somewhere to stdout, so that the phenomenon observed for the first case is simply repeated each time the count function is called, but is producing no output.

There may be something else, but this is my starting assumption. If this is the case, then there might be several underlying causes any one of which is sufficient to yield the behavior noted above.

At any rate, I'm going to investigate the scenario noted above & perhaps this will shed some light on what gives rise to this behavior.

@jburos
Copy link
Member Author

jburos commented May 18, 2017

I'm getting a warning message in some of our projects that No handlers could be found for logger: "x.tcga_data". I wonder if this is related to the problems printing progress using tqdm?

@jburos jburos added the bug label May 18, 2017
@jburos
Copy link
Member Author

jburos commented May 18, 2017

In the above example, the problem was resolved by my adding the following two lines before running the second example above:

import logging
logging.basicConfig()

In that case, the function used cohorts.utils.get_logger to initialize the logger & so was able to skip basic configuration. We should probably be clear about the utility of get_logger to minimize this risk.

jburos added a commit that referenced this issue Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant