-
Notifications
You must be signed in to change notification settings - Fork 738
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
Add Ipywidgets support #60
Comments
Also see #6 |
Hi, As many I'm super interested by that feature support and wanted to know if there was any news about it? Cheers, Thomas |
Are there specific widgets or scenarios that you are interested in? |
@blois : Yes absolutely :) Here is a typical example I would be keen on running in Google Colab: Widgets used: You can play live with it in Binder if you can bear with the slow startup time (just need to execute the cells): https://mybinder.org/v2/gh/colour-science/colour-playground/master?filepath=playground%2Fcolour.ipynb |
@blois, also, some |
@blois, ipyleaflet is another widget that would be very useful to see in Colab. Colab notebooks would be a great way forward for Python users of Google Earth Engine to collaborate, and here, ipyleaflet in Jupyter notebooks is currently among the recommended/favoured options for visualising tiled maps created from analyses. There are workarounds, but support for ipywidgets would be great. Thanks. |
Adding pythreejs to the bunch! |
As a core jupyter-widgets / ipywidget dev I want to let you know we are interested in support on colab. Feel free to reach out to us for help or discussion in care you need help: |
Adding ipysigma to the bunch. |
I'd also like to see ipyevents in the mix...I am a little biased, though, since I wrote it. But including ipyevents would also allow astrowidgets. |
Adding |
+1 |
I need this too! |
I'd just like tqdm progress bars to work nicely, that would be good... |
Me too! |
Another vote for supporting tqdm! |
@diego888 If need to use tqdm on colab immediately. Or you can wait until it is merged into master. |
+1 |
+1 |
+1, would be great if Slider, Checkbox, Combo, Select widgets will become available |
Opened #1302 |
I'd like to be able to use tqdm on colab as well. |
@barissayil tqdm notebook should work in Colab: https://colab.research.google.com/gist/blois/0edb04e592c16cbab8f0f9b1cff3595e/tqdm_notebook.ipynb |
It would be amazing to get support for third party widgets! |
is there any hope for ipyleaflet to be included? |
@blois it appears this has been implemented now - should this issue be closed? |
I'm having trouble with the Play widget. The buttons don't show their icons, and button presses do not trigger any notable reaction. |
Erhannis:
Yes, I ran your code in colab and had the same (poor) results. I then ran
the same code cell in Kaggle and it worked!
Same version of ipywidgets 7.5.1. Perhaps a dependency issue?
🤔
…On Mon, Sep 28, 2020 at 9:33 PM Erhannis ***@***.***> wrote:
I'm having trouble with the Play widget. The buttons don't show their
icons, and button presses do not trigger any notable reaction.
Test case:
https://colab.research.google.com/drive/1WE2pV0UfgRb0cfOVdCkgo7MzwCkLBdDV#scrollTo=Y8eS_TugFa6i
Note that the same code on a local Jupyter instance works properly; the
four buttons have icons, and pressing the play button causes the slider to
advance and the output to output, every 2 seconds.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI6H6K2REJA2EDW46D4XG4TSIFPP3ANCNFSM4EQWT7YQ>
.
|
Maybe so; not sure how I'd know, really. |
If you type the following command in both environments (working and not
working), you will get a list of the installed software and its version
number.
!pip list
Then you compare (yes it is tedious) the differences in the software
release numbers.
Lastly if there is a software package in the working environment that is
NOT present in the non-working environment, then that MAY likely be the
issue.
I will try this too but I encourage you to try it.
Then I may save it and run a "diff" to try and make it easier.
(more automatic).
It may turn out to be an older version of ipython being run in colab?
…On Tue, Sep 29, 2020 at 8:04 AM Erhannis ***@***.***> wrote:
Maybe so; not sure how I'd know, really.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI6H6KZLB3APSR7N3GYSEWDSIHZPBANCNFSM4EQWT7YQ>
.
|
Here is an interesting reference that may help.
https://colab.research.google.com/notebooks/widgets.ipynb
On Tue, Sep 29, 2020 at 9:25 AM Allan Jackson <allan.jackson6255@gmail.com>
wrote:
… If you type the following command in both environments (working and not
working), you will get a list of the installed software and its version
number.
!pip list
Then you compare (yes it is tedious) the differences in the software
release numbers.
Lastly if there is a software package in the working environment that is
NOT present in the non-working environment, then that MAY likely be the
issue.
I will try this too but I encourage you to try it.
Then I may save it and run a "diff" to try and make it easier.
(more automatic).
It may turn out to be an older version of ipython being run in colab?
On Tue, Sep 29, 2020 at 8:04 AM Erhannis ***@***.***> wrote:
> Maybe so; not sure how I'd know, really.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#60 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AI6H6KZLB3APSR7N3GYSEWDSIHZPBANCNFSM4EQWT7YQ>
> .
>
|
@blois That does appear to account for the icon problem, at least; thanks. Unfortunately, while the workaround fixes the icons, the widget remains non-functional. @AJAX6255 Well, I've gotten a As per your note, I see that the ipython version for colab is 5.5.0, vs. jupyter labs' 7.16.1. |
@Erhannis I updated my colab ipython to 7.16.1 (not recommended by colab)
from 5.5.0 and it did not resolve the issue. Hmm..
…On Tue, Sep 29, 2020 at 10:23 AM Erhannis ***@***.***> wrote:
@blois <https://github.com/blois> That does appear to account for the
icon problem, at least; thanks. Unfortunately, while the workaround fixes
the icons, the widget remains non-functional.
@AJAX6255 <https://github.com/AJAX6255> Well, I've gotten a !pip list
from colab and from a jupyter labs workspace, now:
colab_pip.txt
<https://github.com/googlecolab/colabtools/files/5300771/colab_pip.txt>
jupyter_pip.txt
<https://github.com/googlecolab/colabtools/files/5300772/jupyter_pip.txt>
As per your note, I see that the ipython version for colab is 5.5.0, vs.
jupyter labs' 7.16.1.
I also note ipykernel v 4.10.1 vs 5.1.4, though I don't really know what
is and isn't relevant.
The jupyter-client versions are different, and there are a few differences
in exactly which jupyter-related packages are installed.
The versions of ipywidgets appear to be the same.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI6H6K7QBFPV7UISED7UQ2DSIIJZPANCNFSM4EQWT7YQ>
.
|
@Erhannis this looks like it may be an issue with jslink- I just opened https://github.com/googlecolab/colabtools/is. |
Oh! @blois , you were right! jslink doesn't work - but the play widget does, actually! This means that while you can't bind two
It's probably tricky to keep two objects in sync like this, without getting e.g. infinite recursion, but for what I wanted to do I only needed a unidirectional link, anyway. Thanks! |
A good workaround might be link or dlink instead, that goes via the kernel, similar to observe. |
@maartenbreddels Oh, you mean when observe fires it triggers/requires communication with the server? That might explain why using a different computer in my house causes my hacky "animation" to run much slower than when it's localhost, haha |
Yes, since it executes Python code, which lives at the server. That's why jslink (which is handled in the browser) usually gives smoother results (but it cannot execute code). |
Widgets are the most widespread way to provide interactivity with the user in Jupyter notebooks.
Google Colab should support ipywidgets or provide an alternative.
Ref https://stackoverflow.com/questions/47269168/ipywidgets-with-google-colaboratory
The text was updated successfully, but these errors were encountered: