{
  "id": 195256,
  "title": "How to resolve this error Exception: You can only iterate over `iter_test()` once???",
  "url": "/competitions/riiid-test-answer-prediction/discussion/195256",
  "author_name": "V.Prasanna Kumar",
  "post_date": "2020-11-04T09:57:49.954000",
  "votes": 3,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I have trained my model once and predicted once , after changing some lines of code in test_df function i am getting this error.<br>\nIt already took 2 hours to train the model,now how to resolve this without re-training it <br>\nAny ideas please do throw .<br>\nThank You</p>",
  "messages": [
    {
      "id": 1069307,
      "postDate": "2020-11-04T09:57:49.953Z",
      "content": "<p>I have trained my model once and predicted once , after changing some lines of code in test_df function i am getting this error.<br>\nIt already took 2 hours to train the model,now how to resolve this without re-training it <br>\nAny ideas please do throw .<br>\nThank You</p>",
      "rawMarkdown": "I have trained my model once and predicted once , after changing some lines of code in test_df function i am getting this error.\nIt already took 2 hours to train the model,now how to resolve this without re-training it \nAny ideas please do throw .\nThank You",
      "votes": 3
    },
    {
      "id": 1069327,
      "postDate": "2020-11-04T10:13:52.417Z",
      "content": "<p>Save the model as a dataset so that you can use it again repeatedly in the same or other notebooks.</p>",
      "rawMarkdown": "Save the model as a dataset so that you can use it again repeatedly in the same or other notebooks.",
      "votes": 1,
      "replies": [
        {
          "id": 1069336,
          "postDate": "2020-11-04T10:21:58.640Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1069565,
          "postDate": "2020-11-04T15:56:54.733Z",
          "content": "<p>As <a href=\"https://www.kaggle.com/rohanrao\" target=\"_blank\">@rohanrao</a>  said, save your model (either locally or to a dataset) and then restart the session. Instead of training again you can just comment out the training code and load your saved model to continue with the submission iteration.</p>",
          "rawMarkdown": "As @rohanrao  said, save your model (either locally or to a dataset) and then restart the session. Instead of training again you can just comment out the training code and load your saved model to continue with the submission iteration."
        }
      ]
    },
    {
      "id": 1069316,
      "postDate": "2020-11-04T10:08:12.027Z",
      "content": "<p>Wrap the lib imports and everything that's needed in a func and call it via a subprocess.</p>",
      "rawMarkdown": "Wrap the lib imports and everything that's needed in a func and call it via a subprocess."
    }
  ],
  "comments": [
    {
      "id": 1069327,
      "author_name": "Vopani",
      "author_url": "",
      "post_date": "2020-11-04T10:13:52.417000",
      "content": "<p>Save the model as a dataset so that you can use it again repeatedly in the same or other notebooks.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1069336,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-11-04T10:21:58.640000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1069565,
          "author_name": "Abhimanyu Dikshit",
          "author_url": "",
          "post_date": "2020-11-04T15:56:54.733000",
          "content": "<p>As <a href=\"https://www.kaggle.com/rohanrao\" target=\"_blank\">@rohanrao</a>  said, save your model (either locally or to a dataset) and then restart the session. Instead of training again you can just comment out the training code and load your saved model to continue with the submission iteration.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1069316,
      "author_name": "Aditya Soni",
      "author_url": "",
      "post_date": "2020-11-04T10:08:12.027000",
      "content": "<p>Wrap the lib imports and everything that's needed in a func and call it via a subprocess.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1069307": "I have trained my model once and predicted once , after changing some lines of code in test_df function i am getting this error.\nIt already took 2 hours to train the model,now how to resolve this without re-training it \nAny ideas please do throw .\nThank You",
    "1069327": "Save the model as a dataset so that you can use it again repeatedly in the same or other notebooks.",
    "1069316": "Wrap the lib imports and everything that's needed in a func and call it via a subprocess."
  }
}