-
Notifications
You must be signed in to change notification settings - Fork 4
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
Table Widget doesn't render in Google Colab #3
Comments
A different Google Collab notebook opening a simple web server: https://colab.research.google.com/notebooks/snippets/advanced_outputs.ipynb#scrollTo=_7dYIo63EdgL As Colin pointed out, running something like:
... which should show the web UI, instead results in many errors. The API for I also tried adding the path to
The resulting iframe HTML was:
|
Looks similar to googlecolab/colabtools#3079 |
There are two issues at play here:
|
Added a ticket for being unable to set config values when using Deephaven as a library: deephaven/deephaven-core#2964 |
Can use JVM args to get around
However, it looks like the proxy shuts down after a couple connections, so I'm not sure how to address this issue. Seems like the proxyPort is not expecting the connection to stay open? Not sure yet. |
We may have to do some environment inspection to figure out how to display ourselves, which is kind of gross. Take a look at plotly: https://github.com/plotly/plotly.py/blob/49dfcb1868e87627f032731ef2ac48e37891baf4/packages/python/plotly/plotly/io/_renderers.py#L472 |
Part of fix for #3 Added logic to check if the script is being ran in google colab, then replace the server url with proxied url for the specified port if that is the case Tested in google colab, created a widget and verified that the iframe appeared !apt-get install openjdk-11-jdk-headless import os from google.colab.output import eval_js os.environ["JAVA_HOME"] = "/usr/lib/jvm/java-11-openjdk-amd64" from google.colab import drive drive.mount('/content/drive') !pip install --upgrade pip setuptools wheel !pip install deephaven-core deephaven-server !pip install '/content/drive/MyDrive/deephaven_ipywidgets-0.2.0-py2.py3-none-any.whl' import deephaven_server from deephaven_server import Server import portpicker from google.colab.output import eval_js dh_port = portpicker.pick_unused_port() s = Server(port=dh_port, jvm_args=["-Xmx4g", "-Dhttp.requireHttp2=false"], dh_args={'http.requireHttp2': False}) s.start() from google.colab import output output.enable_custom_widget_manager() from deephaven import empty_table t = empty_table(10).update("x=i") from deephaven_ipywidgets import DeephavenWidget DeephavenWidget(t)
Created colab ticket: googlecolab/colabtools#3308 |
@jnumainville the GitHub issue created in colabtools hasn't seen any action yet (may just be because of the holidays). Could try making a Stack Overflow question for this as well: https://stackoverflow.com/questions/tagged/google-colaboratory They don't seem to have a community channel or anything to ask questions that I can find :( |
Description
Deephaven’s Table Widget isn’t rendering in Google Colab.
Steps to reproduce
Use test Google Colab notebook:
https://colab.research.google.com/drive/1Nz-ahfZQW7Hi3f7_X1LI12RTr50130Qv#scrollTo=Kz79bURo18N
Details
Browser: Chrome
Slack thread: https://illumon.slack.com/archives/C03F03BFMAB/p1659710939673389
From Colin Alworth:
it appears that the serve_kernel_port_as_iframe(dh_port) or serve_kernel_port_as_window(dh_port) call is not forwarding correctly - we either see 500s or 403s, while loading the same content locally seems to work (and it ought to be http/1.1 for at least loading the index.html, or the redirect anyway). my hunch is that someone is going to need to start with a very simple http server in python and make sure that loads, and progressively make it more and more interesting to see at what point the google collab proxy craps out.
notes that the dh_port value is embedded in the domain name - it is https://${some junk}-${more junk}-${port}-colab.googleusercontent.com , such as https://01a0wpl5ww4-496ff2e9c6d22116-17237-colab.googleusercontent.com/. Also tried appending /ide/ and /ide/index.html, but to no avail
The text was updated successfully, but these errors were encountered: