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 Bars break in Jupyter Lab #148

Closed
mmccarty opened this issue Sep 5, 2018 · 11 comments
Closed

Progress Bars break in Jupyter Lab #148

mmccarty opened this issue Sep 5, 2018 · 11 comments
Labels

Comments

@mmccarty
Copy link
Member

mmccarty commented Sep 5, 2018

Instead of a progress bar you get

HBox(children=(IntProgress(value=0, description='100000_Sales_Records.csv', max=11), HTML(value='')))

screen shot 2018-09-05 at 1 51 11 pm

@mmccarty mmccarty added the bug label Sep 5, 2018
@martindurant
Copy link
Member

You would need the ipywidgets jlab extension to be installed https://ipywidgets.readthedocs.io/en/stable/user_install.html#installing-the-jupyterlab-extension

I don't think there's any way for us to determine from within the notebook whether the output works or not. There could be a config option to always use text progress bars, although I don't know if those would render well in the non TTY output area.

@martindurant
Copy link
Member

@mmccarty , do you think it's enough to document that, when used in jlab, you need to explicitly enable the extension? Yes, it does work, I tried it.
Frankly, I'm surprised that conda-installing jupyter-widgets doesn't do this automatically, is there someone we should tag here to suggest that it should?

@martindurant
Copy link
Member

@mmccarty , can you post upstream to tqdm?

@mmccarty
Copy link
Member Author

tqdm/tqdm#394 looks related.

@martindurant
Copy link
Member

Commented on that issue. Closing this as something we can't do anything about (but I solved it for our own GUI).

@psarka
Copy link
Contributor

psarka commented Feb 4, 2019

Just wasted an hour on this... :(

@martindurant
Copy link
Member

Did the explanation above correctly describe the situation for you, @psarka ? I believe you wouldn't see this if you installed things from conda versus pip (but I may be mistaken).

@psarka
Copy link
Contributor

psarka commented Feb 4, 2019

Yes, it was the widgets thing. It may be fixed by moving to conda, but my team has settled on using vanilla python.

Not sure if I have a suggestion for this situation, except maybe disabling the loading bars by default until tqdm/tqdm#394 is fixed...

@martindurant
Copy link
Member

martindurant commented Feb 4, 2019 via email

@mirekphd
Copy link

This problem re-emerged in one of our containers with Jupyter Notebook, raising this warning message on every call to papermill.execute_notebook():

HBox(children=(FloatProgress(value=0.0, description='Executing', max=836.0, style=ProgressStyle(description_wi…

/opt/conda/lib/python3.8/site-packages/traitlets/config/configurable.py:73: DeprecationWarning: Passing unrecoginized arguments to super(PapermillNotebookClient).__init__(input_path='./mtpl-conversion-or-(risk)-premium-(change)-model.ipynb', nest_asyncio=True).
object.__init__() takes exactly one argument (the instance to initialize)
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
  super(Configurable, self).__init__(**kwargs)

The solution was to re-install (with conda) jupyter_nbextensions_configurator and then to re-enable the extensions configuration option (the last one in Jupyter Notebook's Edit menu) for the current user, like this:

$ jupyter nbextensions_configurator enable --user
Enabling: jupyter_nbextensions_configurator
- Writing config: /home/jovyan/.jupyter
    - Validating...
      jupyter_nbextensions_configurator 0.4.1 OK
Enabling notebook nbextension nbextensions_configurator/config_menu/main...
Enabling tree nbextension nbextensions_configurator/tree_tab/main...

The extension used by papermill for displaying progress bars (taken from tqdm package) is called jupyter-js-widgets-extension and it should be enabled in Jupyter Nbextensions Configurator to solve this issue (for the current user).

@martindurant
Copy link
Member

Thanks for the report, @mirekphd . I've never used papermill, so it's nice to have people to check and fix these things for us.

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

4 participants