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

[Datasets] Dataset representations don't work out-of-the-box on notebooks #31225

Closed
bveeramani opened this issue Dec 20, 2022 · 11 comments · Fixed by #32841 or #34359
Closed

[Datasets] Dataset representations don't work out-of-the-box on notebooks #31225

bveeramani opened this issue Dec 20, 2022 · 11 comments · Fixed by #32841 or #34359
Assignees
Labels
bug Something that is supposed to be working; but isn't data Ray Data-related issues P1 Issue that should be fixed within a few weeks Ray 2.4

Comments

@bveeramani
Copy link
Member

What happened + What you expected to happen

On Google Colab:

At first, you get warning telling you to upgrade the ipywidgets version.

image

If you do that and then restart the runtime you get a new problem:

Support for third party widgets (widgets outside of the ipywidgets package) needs to be enabled separately. Support for these widgets will be loaded from a CDN external from Colab.

image

On Anyscale:

Instead of a readable output, you get HTML like VBox(children=(HTML(value='<h2>Dataset</h2>'), Tab(children=(HTML(value='<div class="scrollableTable jp-Render…:

image

Versions / Dependencies

Ray: master

Reproduction script

See above.

Issue Severity

Low: It annoys or frustrates me.

@bveeramani bveeramani added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) data Ray Data-related issues P1 Issue that should be fixed within a few weeks and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Dec 20, 2022
@bveeramani bveeramani self-assigned this Dec 28, 2022
@bveeramani
Copy link
Member Author

@peytondmurray do you happen to know how to fix this?

@peytondmurray
Copy link
Contributor

I'm happy to take a look at this, but I'm not exactly sure what the issue is. It could be a problem displaying ipywidgets in google colab - I'll do some testing and report back.

@peytondmurray peytondmurray self-assigned this Jan 31, 2023
@bveeramani
Copy link
Member Author

Okay, sweet. Thanks!

@peytondmurray
Copy link
Contributor

So this works just fine in JupyterLab locally with ray @ 6b081e9.

$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.7.0
ipykernel        : 6.19.2
ipywidgets       : 8.0.4
jupyter_client   : 7.4.8
jupyter_core     : 5.1.0
jupyter_server   : 2.0.1
jupyterlab       : 3.5.1
nbclient         : 0.7.2
nbconvert        : 7.2.6
nbformat         : 5.7.0
notebook         : 6.5.2
qtconsole        : not installed
traitlets        : 5.7.1

This must be something with colab. Will continue investigating.

@peytondmurray
Copy link
Contributor

Hmm, it's possible ipywidgets>=8 is unsupported: googlecolab/colabtools#3020 (comment). Sadly we don't support ipywidgets<8, so for now it seems there is a conflict.

@peytondmurray
Copy link
Contributor

Quick update on this: I'm going to try to find a way to detect whether we're running in google colab, and disable the notebook integration if that's the case. Will open a PR in a bit 🦾

@bveeramani
Copy link
Member Author

@peytondmurray does #32841 also fix the issue on Anyscale?

@peytondmurray
Copy link
Contributor

@bveeramani I'm not sure - I wasn't aware that this was affecting Anyscale as well. Is there a way I can access an environment to test?

@amogkam
Copy link
Contributor

amogkam commented Apr 5, 2023

I'm still seeing this issue on Anyscale even with ipywidgets>=8

VBox(children=(HTML(value='<h2>Dataset</h2>'), Tab(children=(HTML(value='<div class="scrollableTable jp-Render…

@peytondmurray
Copy link
Contributor

peytondmurray commented Apr 12, 2023

@amogkam @bveeramani So in the process of working on this, I think I came across a separate bug which I've made a PR for in #34339. One question about this issue though - did you restart the jupyter server after installed ipywidgets? I know locally, at least, the fancy notebook repr won't show up after installing ipywidgets>=8 unless you restart the jupyter server first. I don't know much about Anyscale, but could you please confirm this fixes the issue locally?

I'm thinking at the minimum we should make a better error message for the user ipywidgets>=8 is not installed, because at the moment the message is not at all clear enough.

At the same time, I'll investigate ways we can check if a repr is being correctly displayed. If there's a way to check this at runtime, we might be able to display a more informative error message rather than this VBox.... junk.

@pcmoritz
Copy link
Contributor

I've also been seeing this issue locally on my laptop with the latest Ray master and the ipython executable (in the shell).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't data Ray Data-related issues P1 Issue that should be fixed within a few weeks Ray 2.4
Projects
None yet
5 participants