Qiita Careers powered by IndeedPR

求人サイト「Qiita Careers powered by Indeed」では、エンジニアのあなたにマッチした求人が見つかります。

35
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Google Colabのセッション切れを防止

Last updated at Posted at 2023-02-07

こんにちは。hatterです。

GoogleColab Proを使い始めましたが、セッション切れ(90分の方)に悩まされていました。
対策方法が見つかったのでメモを残しておきます。

対策方法

  1. Google Colabを実行させるChromeブラウザでF12を押して、デベロッパーツールを開く
  2. Consoleウィンドウで、次のように入力してEnterキーを押す
function ClickConnect(){
  console.log("60sごとに再接続");
  document.querySelector("colab-connect-button").click()
}
setInterval(ClickConnect,1000*60);

ひとまずこれで90分の方は解決しました。
しかし、12時間の方は対応できないので工夫が必要そうです。
お読みいただきありがとうございました。

参考記事

Google Colab セッション切れを防止する

35
22
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
hatter17

@hatter17(hatter)

日本の電機メーカで歩行者検知アルゴリズムを開発しています。 Pythonや機械学習に興味があります。

Linked from these articles

Comments

No comments

Let's comment your feelings that are more than good

Being held Article posting campaign

2026年!初アウトプットをしよう

2026-01-01 ~ 2026-01-31

View details
35
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Login to continue?

Login or Sign up with social account

Login or Sign up with your email address