solaris icon indicating copy to clipboard operation
solaris copied to clipboard

[FEATURE]: (import `tqdm` from `tqdm.auto`)

Open mlubej opened this issue 5 years ago • 6 comments

Currently, if solaris is run in a notebook environment, the progress bar is being printed out as stderr. This prints out unnecessary lines.

tqdm can be imported as from tqdm.auto import tqdm, and the proper progress bar is loaded, either fr a notebook or script environment.

I've noticed this happening in https://github.com/CosmiQ/solaris/blob/master/solaris/eval/base.py but it's probably also elsewhere.

mlubej avatar Feb 18 '20 09:02 mlubej

Hi @mlubej!

Thanks for bringing this up. I agree that using the version from tqdm.auto is better. If you have the time to make those changes and put in a PR we'd greatly appreciate it! If not, we'll try to get to it during our next batch of changes.

-Nick

nrweir avatar Feb 19 '20 14:02 nrweir

Worth noting, though, that at least in some Jupyter environments, from tqdm.auto import tqdm doesn't really solve the problem. I was just trying that out in a Jupyterlab notebook I'm working in right now, and instead of a progress bar, it's printing the following:

HBox(children=(IntProgress(value=0, max=381), HTML(value='')))

nrweir avatar Feb 19 '20 19:02 nrweir

Hi @nrweir,

your problem with the progress bar is native only to the Jupyterlab environment. You have to enable the ipywidgets.

See: https://github.com/tqdm/tqdm/issues/394#issuecomment-384743637

mlubej avatar Feb 20 '20 12:02 mlubej

Yeah...that makes sense! Thanks.

nrweir avatar Feb 20 '20 13:02 nrweir

Hi

Even I am facing the same issue since two days. The progress bar for tqdm never loads image

I am running this on jupyter notebook in GCP. version jupyter-notebook : 5.7.8

Thanks

jayaBalaR avatar Feb 21 '20 15:02 jayaBalaR

Thanks for the helpful issue @mlubej, ~~I'm adding this into https://github.com/CosmiQ/solaris/pull/331~~

It looks like changing the import introduced other issues so this actually wasn't included in #331

rbavery avatar Apr 02 '20 00:04 rbavery