-
Notifications
You must be signed in to change notification settings - Fork 732
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
Support installation of custom widgets. #498
Comments
Qgrid would make it easier to work with pandas dataframe. Hope it will be supported in the future. |
We're building a custom widget called Clustergrammer2 that is a webgl DataFrame viewer and is currently supported on Kaggle https://www.kaggle.com/cornhundred/heatmap-view-of-modern-era-player-stats Also see nbviewer https://nbviewer.jupyter.org/github/ismms-himc/clustergrammer2-notebooks/blob/master/notebooks/3.0_10X_Genomics_2700_Dataset_NBViewer.ipynb |
Glancing at the widget code in https://github.com/ismms-himc/clustergrammer2/blob/5acea9bff7eda546cf0647b9e3647f631eb6f5f5/clustergrammer2/clustergrammer_fun/__init__.py#L222, it doesn't seem like it's making much use of the Widgets API, specifically comms messages. A quick example of your (very slick) notebook running in Colab, with the visualizations: |
Thanks @blois for your help. In order to run the notebook you sent I had to add the Seasons_Stats.csv (from here https://www.kaggle.com/drgilermo/nba-players-stats) to the filesystem.
Looking forward to custom widget support, but this definitely helps out in the interim. BTW @blois, how can I upload a dataset permanently into a shareable colab notebook (e.g. the sandbox link you sent)? Here is a link to a notebook that does not require an external dataset https://colab.research.google.com/gist/cornhundred/b7154ee964c71cec6a2378f9cbba8eeb/clustergrammer2_example.ipynb?authuser=1 |
@korakot we recently added an interactive dataframe viewer that we've been using internally for ages. You can enable it by default with: %load_ext google.colab.data_table
from vega_datasets import data
data.cars() Or use it on a per-dataframe basis: from google.colab.data_table import DataTable
from vega_datasets import data
DataTable(data.cars()) |
@blois Thanks a lot. It will surely help. BTW, is there a widget to edit the dataframe as well? And what other |
can you install custom widgets now? I'd like to have a variable previewer just like allefeld/ipyinspector#1 |
This problem still persists with Google Colab on August 13th, 2020. |
@blois Please add support for ipyleaflet, which would make visualizing and interacting Google Earth Engine tile layers much easier with the earthengine-api. @tylere @SylvainCorlay @martinRenou @davidbrochart |
@blois any updates on this? |
@kylebarron I tried debugging this and the messages are passed without issue. It seems the proper commands are sent to plotly but nothing is being displayed (i.e., the entire DOM element for plotly is empty). It would be really nice to have this working in Colab. |
Just noting that I was wrong here. The Plotly from google.colab import output
output.enable_custom_widget_manager()
import plotly.graph_objects as go
f = go.FigureWidget(layout={'height': 400, 'width': 400})
f if you look in the network tab the right plotly widget bundle gets downloaded ( |
@kylebarron @JesseFarebro Details on the Plotly issue are in googlecolab/colab-cdn-widget-manager#19. |
Thanks for taking a look at this @kylebarron @JesseFarebro, and thanks for the quick fix @blois—I'm looking forward to seeing it go live! |
@cardinalgeo your example should now be working, see googlecolab/colab-cdn-widget-manager#19 (comment). |
Thanks @blois! However, the example is unfortunately still not working. Running the block in the jupyter lab screenshot below should produce both the widgets and the plot, as is pictured. But running the same cell in colab only produces the widgets. I can run |
From my comment here #498 (comment)
In order to render the widget and not the static HTML output mode, you need to render without Here, the widget doesn't render, and I see this console error: |
For those who want to use For example, you can do |
Please add support for the ipytree widget too: #2522 |
@kylebarron thanks for the Plotly widget example! I can't find a way to view the console error (is it from terminal, which is only available with colab pro)? Do you have any sense of whether this issue can be resolved on the Colab side or if it will require work on the Plotly side? |
@cardinalgeo Support for the plotly widgets was tracked in googlecolab/colab-cdn-widget-manager#19. There's a link to your example working in there. |
At this point installation of custom widgets is supported. This requires opting in by using the code: from google.colab import output
output.enable_custom_widget_manager() Specific widgets may need additional investigation or tweaks. It's easiest to open individual issues for these investigations. Most of the bugs have been tracked in https://github.com/googlecolab/colab-cdn-widget-manager/issues?q=is%3Aissue. |
Hi @blois, thanks for the follow up! However, the example still seems to not work. I'll continue this thread in googlecolab/colab-cdn-widget-manager#19 |
Thanks a lot for your work on this @blois ! |
Thanks @blois!!! This is amazing! |
Today ipywidgets Text will no longer work. There is a message about adding two lines to allow external widgets loading but that does not fix the problem. |
@nulflux downgrading the ipywidgets version should work for you until we can get a fix out:
|
That worked, thank you!
…On Fri, Aug 19, 2022 at 11:33 AM colaboratory-team ***@***.***> wrote:
@nulflux <https://github.com/nulflux> downgrading the ipywidgets version
should work for you until we can get a fix out:
!pip install ipywidgets==7.7.1 and then restart your runtime
—
Reply to this email directly, view it on GitHub
<#498 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AECOH5K25LA544LC3S4AU2LVZ7HPPANCNFSM4HCCO3UA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Added some details on the issue in #3020 (comment). |
Currently Colab only supports the widgets included in the ipywidgets package and does not allow installing additional widgets.
Additional background is available at https://github.com/nteract/nes/tree/master/portable-widgets.
The text was updated successfully, but these errors were encountered: