googlecolab / colab-cdn-widget-manager

Apache License 2.0
22 stars 9 forks source link

jupyter_rfb does not work in collab #32

Open kushalkolar opened 1 year ago

kushalkolar commented 1 year ago

jupyter_rfb is an amazing package that allows you to perform off screen rendering and view the frame buffer within a jupyter notebook. It subclasses ipywidgets.DOMWidget, as you can see here:

https://github.com/vispy/jupyter_rfb/blob/main/jupyter_rfb/widget.py

Unfortunately it does not work within collab notebooks. This is the behavior within a collab notebook, even if we try using from google.colab import output;output.enable_custom_widget_manager() :

As you can see, from the hello world example, only a snapshot of the frame buffer is shown but the proper resizable and interactive canvas is not functional.

https://user-images.githubusercontent.com/9403332/210935866-6eced019-5995-4bb1-bbf0-38638478fd57.mp4

This is how it works in jupyter using mybinder:

https://user-images.githubusercontent.com/9403332/210935956-fffd0787-fee2-467b-8f08-340956389e9f.mp4

We recently started writing a plotting library fastplotlib based on the pygfx rendering engine, it allows for very large scale visualizations, especially for imaging data where no other solution exists that is this fast and performant. Would be great if it could work in collab, since it already works via jupyter_rfb in regular jupyter notebooks!

kushalkolar commented 1 year ago

bump