I was trying to use H2O ai to automate model selection, and this Python library creates a local server, presumably opened with my default browser.
What happened is, as I had Chrome open, I ran the code. The code took a while, and then froze my PC completely. I had to restart.
Once I restarted, my Chrome seems to have disappeared.
Here is the code I used:
import h2o
from h2o.automl import H2OAutoML
from sklearn.model_selection import train_test_split
h2o.init()
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 "21.0.4" 2024-07-16; OpenJDK Runtime Environment (Red_Hat-21.0.4.0.7-2) (build 21.0.4+7); OpenJDK 64-Bit Server VM (Red_Hat-21.0.4.0.7-2) (build 21.0.4+7, mixed mode, sharing)
Starting server from /mnt/sda1/PycharmProjects/anespo-DL.4.1/.venv/lib/python3.12/site-packages/h2o/backend/bin/h2o.jar
Ice root: /tmp/tmpurwn74sc
JVM stdout: /tmp/tmpurwn74sc/h2o_alessio_started_from_python.out
JVM stderr: /tmp/tmpurwn74sc/h2o_alessio_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: 01 secs
H2O_cluster_timezone: Europe/Rome
H2O_data_parsing_timezone: UTC
H2O_cluster_version: 3.46.0.4
H2O_cluster_version_age: 1 month and 1 day
H2O_cluster_name: H2O_from_python_alessio_slup1a
H2O_cluster_total_nodes: 1
H2O_cluster_free_memory: 7.601 Gb
H2O_cluster_total_cores: 32
H2O_cluster_allowed_cores: 32
H2O_cluster_status: locked, healthy
H2O_connection_url: http://127.0.0.1:54321
H2O_connection_proxy: {"http": null, "https": null}
H2O_internal_security: False
Python_version: 3.12.4 final
h2o_df = h2o.H2OFrame(df_3)
from sklearn.feature_extraction.text import TfidfVectorizer
tfidf = TfidfVectorizer(max_features=5000)
tfidf_matrix = tfidf.fit_transform(df['text'])
tfidf_df = pd.DataFrame(tfidf_matrix.toarray(), columns=tfidf.get_feature_names_out())
df_final = pd.concat([tfidf_df, df['label']], axis=1)
h2o_df = h2o.H2OFrame(df_final)
h2o_df['label'] = h2o_df['label'].asfactor()
aml = H2OAutoML(max_runtime_secs=3600,
project_name="fake_news_classification",
stopping_metric="AUC",
seed=42)
aml.train(x=train.columns[:-1], y='label', training_frame=train)
lb = aml.leaderboard
print(lb)
aml = H2OAutoML(max_runtime_secs=3600,
project_name="fake_news_classification",
stopping_metric="AUC",
seed=42)
aml.train(x=train.columns[:-1], y='label', training_frame=train)
lb = aml.leaderboard
print(lb)
Then I noticed it kept giving me connection errors
Job request failed Local server has died unexpectedly. RIP., will retry after 3s.
And then I noticed my browser seemed to not open anymore. I can’t even find it in my installed applications.
alessio@fedora:~$ sudo dnf repolist
repo id repo name
WineHQ WineHQ packages
brave-browser Brave Browser
code Visual Studio Code
docker-ce-stable Docker CE Stable - x86_64
fedora Fedora 40 - x86_64
fedora-cisco-openh264 Fedora 40 openh264 (From Cisco) - x86_64
google-chrome google-chrome
protonvpn-fedora-stable ProtonVPN Fedora Stable repository
rpmfusion-free RPM Fusion for Fedora 40 - Free
rpmfusion-free-tainted RPM Fusion for Fedora 40 - Free tainted
rpmfusion-free-updates RPM Fusion for Fedora 40 - Free - Updates
rpmfusion-nonfree RPM Fusion for Fedora 40 - Nonfree
rpmfusion-nonfree-tainted RPM Fusion for Fedora 40 - Nonfree tainted
rpmfusion-nonfree-updates RPM Fusion for Fedora 40 - Nonfree - Updates
updates Fedora 40 - x86_64 - Updates
alessio@fedora:~$ which google-chrome
/usr/bin/which: no google-chrome in (/home/alessio/google-cloud-sdk/bin:/home/alessio/.local/bin:/home/alessio/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/lib/snapd/snap/bin)
I am not sure how else to check what went wrong. Any ideas?