{
  "id": 113704,
  "title": "Trying to Make a Dollar Outta 15 Cents-- Colab Disconnect",
  "url": "/competitions/rsna-intracranial-hemorrhage-detection/discussion/113704",
  "author_name": "William Green",
  "post_date": "2019-10-21T15:49:30.606000",
  "votes": 6,
  "comment_count": 5,
  "views": 0,
  "content": "<p>I imagine that there are few kagglers using Google Colab and experiencing disconnect while running thier code in Colab. Quite the frustrating experience if you ask me. I found this nice blog post on <a href=\"https://medium.com/@shivamrawat_756/how-to-prevent-google-colab-from-disconnecting-717b88a128c0\">Medium</a> that provides simple instructions on preventing disconnect.  Here's the code below: </p>\n\n<p><em><strong>Ctrl+ Shift + i to open inspector view . Then goto console.</strong></em></p>\n\n<p><code>\nfunction ClickConnect(){\nconsole.log(\"Working\"); \ndocument.querySelector(\"colab-toolbar-button#connect\").click() \n}\nsetInterval(ClickConnect,60000)\n</code></p>\n\n<p>I don't have any feedback in regards to whether this works or not. However, I am testing it now. </p>",
  "messages": [
    {
      "id": 654218,
      "postDate": "2019-10-21T15:49:30.607Z",
      "content": "<p>I imagine that there are few kagglers using Google Colab and experiencing disconnect while running thier code in Colab. Quite the frustrating experience if you ask me. I found this nice blog post on <a href=\"https://medium.com/@shivamrawat_756/how-to-prevent-google-colab-from-disconnecting-717b88a128c0\">Medium</a> that provides simple instructions on preventing disconnect.  Here's the code below: </p>\n\n<p><em><strong>Ctrl+ Shift + i to open inspector view . Then goto console.</strong></em></p>\n\n<p><code>\nfunction ClickConnect(){\nconsole.log(\"Working\"); \ndocument.querySelector(\"colab-toolbar-button#connect\").click() \n}\nsetInterval(ClickConnect,60000)\n</code></p>\n\n<p>I don't have any feedback in regards to whether this works or not. However, I am testing it now. </p>",
      "rawMarkdown": "I imagine that there are few kagglers using Google Colab and experiencing disconnect while running thier code in Colab. Quite the frustrating experience if you ask me. I found this nice blog post on [Medium](https://medium.com/@shivamrawat_756/how-to-prevent-google-colab-from-disconnecting-717b88a128c0) that provides simple instructions on preventing disconnect.  Here's the code below: \n\n***Ctrl+ Shift + i to open inspector view . Then goto console.***\n\n```\nfunction ClickConnect(){\nconsole.log(\"Working\"); \ndocument.querySelector(\"colab-toolbar-button#connect\").click() \n}\nsetInterval(ClickConnect,60000)\n```\n\nI don't have any feedback in regards to whether this works or not. However, I am testing it now. ",
      "votes": 6
    },
    {
      "id": 654245,
      "postDate": "2019-10-21T16:01:16.220Z",
      "content": "<p>i  used that code before,actually it works when  you are doing nothing in colab and after sometimes your kernel gets disconnected,but  if your  model is running in colab then  the  code above is not required to avoid disconnection maybe,</p>",
      "rawMarkdown": "i  used that code before,actually it works when  you are doing nothing in colab and after sometimes your kernel gets disconnected,but  if your  model is running in colab then  the  code above is not required to avoid disconnection maybe,",
      "replies": [
        {
          "id": 654250,
          "postDate": "2019-10-21T16:05:18.027Z",
          "content": "<p>My model is being disconnect even when running. </p>",
          "rawMarkdown": "My model is being disconnect even when running. ",
          "votes": 1
        },
        {
          "id": 654254,
          "postDate": "2019-10-21T16:09:04.147Z",
          "content": "<p>even after using that code you mentioned in your post?</p>",
          "rawMarkdown": "even after using that code you mentioned in your post?"
        },
        {
          "id": 654265,
          "postDate": "2019-10-21T16:26:00.017Z",
          "content": "<p>I was talking about prior to trying the code out. So far it hasn't time out. </p>",
          "rawMarkdown": "I was talking about prior to trying the code out. So far it hasn't time out. ",
          "votes": 1
        },
        {
          "id": 654270,
          "postDate": "2019-10-21T16:33:05.087Z",
          "content": "<p>i tried that and if i can remember correctly i  didn't  face disconnect problem after using that but yeah  at night or once in every day you  will see error like \"beckend not found\" something like that,and no solution for that problem,maybe it happens because at that time colab gets huge users everyday</p>",
          "rawMarkdown": "i tried that and if i can remember correctly i  didn't  face disconnect problem after using that but yeah  at night or once in every day you  will see error like \"beckend not found\" something like that,and no solution for that problem,maybe it happens because at that time colab gets huge users everyday",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 654245,
      "author_name": "Mobassir",
      "author_url": "",
      "post_date": "2019-10-21T16:01:16.220000",
      "content": "<p>i  used that code before,actually it works when  you are doing nothing in colab and after sometimes your kernel gets disconnected,but  if your  model is running in colab then  the  code above is not required to avoid disconnection maybe,</p>",
      "votes": 0,
      "replies": [
        {
          "id": 654250,
          "author_name": "William Green",
          "author_url": "",
          "post_date": "2019-10-21T16:05:18.027000",
          "content": "<p>My model is being disconnect even when running. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 654254,
          "author_name": "Mobassir",
          "author_url": "",
          "post_date": "2019-10-21T16:09:04.147000",
          "content": "<p>even after using that code you mentioned in your post?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 654265,
          "author_name": "William Green",
          "author_url": "",
          "post_date": "2019-10-21T16:26:00.017000",
          "content": "<p>I was talking about prior to trying the code out. So far it hasn't time out. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 654270,
          "author_name": "Mobassir",
          "author_url": "",
          "post_date": "2019-10-21T16:33:05.087000",
          "content": "<p>i tried that and if i can remember correctly i  didn't  face disconnect problem after using that but yeah  at night or once in every day you  will see error like \"beckend not found\" something like that,and no solution for that problem,maybe it happens because at that time colab gets huge users everyday</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "654218": "I imagine that there are few kagglers using Google Colab and experiencing disconnect while running thier code in Colab. Quite the frustrating experience if you ask me. I found this nice blog post on [Medium](https://medium.com/@shivamrawat_756/how-to-prevent-google-colab-from-disconnecting-717b88a128c0) that provides simple instructions on preventing disconnect.  Here's the code below: \n\n***Ctrl+ Shift + i to open inspector view . Then goto console.***\n\n```\nfunction ClickConnect(){\nconsole.log(\"Working\"); \ndocument.querySelector(\"colab-toolbar-button#connect\").click() \n}\nsetInterval(ClickConnect,60000)\n```\n\nI don't have any feedback in regards to whether this works or not. However, I am testing it now. ",
    "654245": "i  used that code before,actually it works when  you are doing nothing in colab and after sometimes your kernel gets disconnected,but  if your  model is running in colab then  the  code above is not required to avoid disconnection maybe,"
  }
}