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

Guard against using ipywidgets in google colab #32841

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

peytondmurray
Copy link
Contributor

@peytondmurray peytondmurray commented Feb 25, 2023

Why are these changes needed?

This PR guards against using ipywidgets in google colab due to an incompatibility. It does this by adding a decorator to all _ipython_display_ definitions which simply prints the object repr instead of displaying a widget.

Related issue number

Closes #31225.

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(
    • Test by hand - upload wheels built by CI to a google colab instance. Install ray, then ipywidgets. No calls to IPython.display.display will be made.

image

@peytondmurray peytondmurray force-pushed the colab-ipywidgets-fix branch 2 times, most recently from b655d36 to 640c5b2 Compare February 27, 2023 19:27
@peytondmurray peytondmurray changed the title [WIP] Guard against google colab environments for ipywidgets and html reprs Guard against google colab environments for ipywidgets and html reprs Feb 27, 2023
@peytondmurray peytondmurray changed the title Guard against google colab environments for ipywidgets and html reprs Guard against using ipywidgets in google colab Feb 27, 2023
@peytondmurray peytondmurray force-pushed the colab-ipywidgets-fix branch 4 times, most recently from 69f99e4 to 5cb28c2 Compare March 1, 2023 23:27
Signed-off-by: pdmurray <peynmurray@gmail.com>
@peytondmurray peytondmurray force-pushed the colab-ipywidgets-fix branch from 5cb28c2 to 98bce1d Compare March 2, 2023 01:08
@peytondmurray peytondmurray marked this pull request as ready for review March 2, 2023 01:17
@ericl ericl self-assigned this Mar 2, 2023
@ericl
Copy link
Contributor

ericl commented Mar 2, 2023

Test failures known. Merging, thanks!

@ericl ericl merged commit cb70427 into ray-project:master Mar 2, 2023
@peytondmurray peytondmurray deleted the colab-ipywidgets-fix branch March 2, 2023 22:28
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request Mar 21, 2023
This PR guards against using ipywidgets in google colab due to an incompatibility. It does this by adding a decorator to all `_ipython_display_` definitions which simply prints the object `repr` instead of displaying a widget.

Signed-off-by: Jack He <jackhe2345@gmail.com>
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
This PR guards against using ipywidgets in google colab due to an incompatibility. It does this by adding a decorator to all `_ipython_display_` definitions which simply prints the object `repr` instead of displaying a widget.

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
peytondmurray added a commit to peytondmurray/ray that referenced this pull request Mar 22, 2023
This PR guards against using ipywidgets in google colab due to an incompatibility. It does this by adding a decorator to all `_ipython_display_` definitions which simply prints the object `repr` instead of displaying a widget.
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
This PR guards against using ipywidgets in google colab due to an incompatibility. It does this by adding a decorator to all `_ipython_display_` definitions which simply prints the object `repr` instead of displaying a widget.

Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
This PR guards against using ipywidgets in google colab due to an incompatibility. It does this by adding a decorator to all `_ipython_display_` definitions which simply prints the object `repr` instead of displaying a widget.

Signed-off-by: Jack He <jackhe2345@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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