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

Rethinking the Jupyter progress bar. #1087

Closed
jgosmann opened this issue Jun 10, 2016 · 5 comments · Fixed by #1428
Closed

Rethinking the Jupyter progress bar. #1087

jgosmann opened this issue Jun 10, 2016 · 5 comments · Fixed by #1428

Comments

@jgosmann
Copy link
Collaborator

The Jupyter widget API changed quite a bit over the last couple of versions, but seems to get more stable now that they moved it to its own package. We should take another look at the current recommended way to implement and distribute such widgets and see whether it makes sense to adopt the recommended approach for Nengo.

@jgosmann
Copy link
Collaborator Author

jgosmann commented Oct 7, 2017

The Jupyter progress bar will crash the notebook when used with the 5.1.0 notebook release. After that the page needs to reloaded to restore communication between the notebook and kernel. This might be due to the way we inject the JavaScript into notebook.

Currently we are trying to support a number of notebook versions. It would be nice if we could drop support for older versions to reduce code complexity (and testing burden) with the next minor release. After all it is nice, but non-essential feature (there is still the ASCII progress bar or the possibility to use an older Nengo version if desired).

Should we also do bugfix release to at least not break the notebook (fallback to the ASCII bar)? It is probably not obvious to the average user why the notebook breaks if they happen to use the Jupyter progress bar. On the other hand, the workaround is easy once known (just don't do %load_ext nengo.ipynb).

Thoughts, @tbekolay?

Also, should we rename nengo.ipynb to match the rebranding? Not sure, what a good name would be, though. Also, the notebooks also still use the ipynb extension.

@jgosmann jgosmann added the bug label Oct 7, 2017
@tbekolay
Copy link
Member

I'm fine dropping support for older versions (people can revert to an earlier released version that works with older notebook versions if they're annoyed), and yeah, if the current version is crashing the notebook I say we remove it for the time being. If a PR for that gets merged we can do a quick release.

@jgosmann
Copy link
Collaborator Author

I can't figure out which older versions actually work because the versioning in the Jupyter eco system is a mess. There is a multitude of potentially relevant packages (jupyter, jupyter-client, jupyter-core, notebook, widgetsnbextension, ipywidgets), all with different current version and I can find no documentation what set of versions is supposed ot give an environment in which the widgets work. Even if I were able to figure out what versions work and which do not, versions on the Jupyter server side are probably relevant and these cannot be queried in the kernel (%load_ext is executed in the kernel context).

@jgosmann
Copy link
Collaborator Author

The difficulties in retiring the old progress bar apart, I made an exciting discovery: The rich display system of IPython supports updating of outputs since version 5.x. This allows for a much more robust and easier implementation of the progress bar without widgets (or the need to do %load_ext nengo.ipynb).

@celiasmith
Copy link
Contributor

celiasmith commented Oct 25, 2017 via email

jgosmann added a commit that referenced this issue Oct 25, 2017
Based on the rich display system, supports IPython >= 5.

Addresses #1087.
@jgosmann jgosmann removed their assignment Oct 31, 2017
jgosmann added a commit that referenced this issue Nov 17, 2017
Based on the rich display system, supports IPython >= 5.

Addresses #1087.
jgosmann added a commit that referenced this issue Nov 17, 2017
Based on the rich display system, supports IPython >= 5.

Addresses #1087.
tbekolay pushed a commit that referenced this issue Mar 29, 2018
Based on the rich display system, supports IPython >= 5.

Addresses #1087.
tbekolay pushed a commit that referenced this issue Mar 30, 2018
Based on the rich display system, supports IPython >= 5.

Addresses #1087.
tbekolay pushed a commit that referenced this issue Mar 30, 2018
Based on the rich display system, supports IPython >= 5.

Addresses #1087.
tbekolay pushed a commit that referenced this issue Mar 30, 2018
Based on the rich display system, supports IPython >= 5.

Addresses #1087.
tbekolay pushed a commit that referenced this issue Mar 30, 2018
Based on the rich display system, supports IPython >= 5.

Addresses #1087.
jgosmann added a commit that referenced this issue Apr 16, 2018
jgosmann added a commit that referenced this issue Apr 16, 2018
@jgosmann jgosmann removed the bug label Apr 16, 2018
tbekolay pushed a commit that referenced this issue Aug 30, 2018
tbekolay pushed a commit that referenced this issue Aug 30, 2018
This is used in Jupyter lab.

Closes #1087.
tbekolay pushed a commit that referenced this issue Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants