1

Does anyone know how to access H2O Flow when using Google Colab?

My code is as follows:

!pip install H2O
import h2o
h2o.init(bind_to_localhost=False, log_dir="./")
from google.colab.output import eval_js
print(eval_js("google.colab.kernel.proxyPort(54321)"))

this code shows the following output:

Checking whether there is an H2O instance running at http://localhost:54321 ..... not found.
Attempting to start a local H2O server...
  Java Version: openjdk version "11.0.10" 2021-01-19; OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.18.04); OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
  Starting server from /usr/local/lib/python3.7/dist-packages/h2o/backend/bin/h2o.jar
  Ice root: /tmp/tmp5mullu7m
  JVM stdout: /tmp/tmp5mullu7m/h2o_unknownUser_started_from_python.out
  JVM stderr: /tmp/tmp5mullu7m/h2o_unknownUser_started_from_python.err
  Server is running at http://127.0.0.1:54321
Connecting to H2O server at http://127.0.0.1:54321 ... successful.

H2O_cluster_uptime:     02 secs
H2O_cluster_timezone:   Etc/UTC
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:    3.32.1.1
H2O_cluster_version_age:    3 days
H2O_cluster_name:   H2O_from_python_unknownUser_0ttq4b
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    3.180 Gb
H2O_cluster_total_cores:    2
H2O_cluster_allowed_cores:  2
H2O_cluster_status:     accepting new members, healthy
H2O_connection_url:     http://127.0.0.1:54321
H2O_connection_proxy:   {"http": null, "https": null}
H2O_internal_security:  False
H2O_API_Extensions:     Amazon S3, XGBoost, Algos, AutoML, Core V3, TargetEncoder, Core V4
Python_version:     3.7.10 final

https://0258qgrdz6tx-496ff2e9c6d22116-54321-colab.googleusercontent.com/

and clicking https://0258qgrdz6tx-496ff2e9c6d22116-54321-colab.googleusercontent.com/ returns HTTP 500 error with "Not Implemented" message instead of H2O Flow (Web UI) page.

It seems that the message is returned by Persist class.

Kohei TAMURA
  • 4,970
  • 7
  • 25
  • 49

1 Answers1

0

You can use localtunnel to expose the port that H2O.ai runs on:

Install localtunnel:

!npm install -g localtunnel

Start localtunnel:

!lt --port 54321

Then you can navigate to the url it returns and access H2O.ai notebook.

Rumesh Madhusanka
  • 1,105
  • 3
  • 12
  • 26