push_notebook does not work in Google Colaboratory
See original GitHub issueHello!
I tried to create an interactive plot with bokeh in Google Colab. The following code renders a scatter plot as expected:
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
from bokeh.io import output_notebook, push_notebook, show
import numpy as np
output_notebook(hide_banner=True)
source = ColumnDataSource(data=dict(x=np.random.rand(10), y=np.random.rand(10)))
p = figure(output_backend="webgl")
scatter = p.scatter(source=source, x='x', y='y')
handle = show(p, notebook_handle=True)
Changing the data and calling push_notebook should change the positions of the points in the scatter plot:
scatter.data_source.data['x'] = np.random.rand(10)
scatter.data_source.data['y'] = np.random.rand(10)
push_notebook(handle)
Instead, the notebook crashes (“Runtime disconnected”). This happens with bokeh version 1.3.4. You can find a demo of the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
push_notebook does not work in Google Collab Jupyter ...
1 Answer 1 ... push_notebook does not and cannot work on Google Collab due to the fact that Google's notebook implementation will not...
Read more >Troubleshooting Google Colab for the Total Newbie
Working in Google Colab for the first time has been completely awesome and pretty shockingly easy, but it hasn't been without a couple...
Read more >What is Google Colab? - Medium
Colab is basically a free Jupyter notebook environment running wholly in the cloud. Most importantly, Colab does not require a setup, plus the...
Read more >How to Upload Project on GitHub from Google Colab?
One can use Google Colab to develop machine learning projects and can easily upload them in Github by following the below steps: Open...
Read more >Complete Beginner's Tutorial to Google Colab - YouTube
Notebook available here: https:// colab.research. google.com/drive/1g7_rzcvOEIUjXLJqorcTcaQc5ng0RNPn?usp=sharingRoadmap to Become a Data ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am working on this on two fronts right now-
Once the binary comms plumbing is in Colab we should be able to either expose some globals in the environment or if the above jupyter-output-spec stabilizes and is acceptable then implement that.
I’m working up a PR to add support for those comms to bokeh (and the HoloViz stack). I’ll reopen this issue since the ball is now in our court.