{
  "id": 164859,
  "title": "Question Regarding TPU Usage",
  "url": "/competitions/osic-pulmonary-fibrosis-progression/discussion/164859",
  "author_name": "",
  "post_date": "2020-07-07T18:55:16.352044Z",
  "votes": 3,
  "comment_count": 5,
  "views": 0,
  "content": "<p>The Code requirements say that the notebook through which I submit cannot be a TPU notebook. But it also says that I can use TPUs for training models. So if I train my model with a TPU in one notebook, just load the submission file onto another notebook and submit via this new notebook, is my submission valid?</p>",
  "messages": [
    {
      "id": "919190",
      "postDate": "07/07/2020 18:55:16",
      "content": "<p>The Code requirements say that the notebook through which I submit cannot be a TPU notebook. But it also says that I can use TPUs for training models. So if I train my model with a TPU in one notebook, just load the submission file onto another notebook and submit via this new notebook, is my submission valid?</p>",
      "rawMarkdown": "The Code requirements say that the notebook through which I submit cannot be a TPU notebook. But it also says that I can use TPUs for training models. So if I train my model with a TPU in one notebook, just load the submission file onto another notebook and submit via this new notebook, is my submission valid?",
      "votes": null
    },
    {
      "id": "919262",
      "postDate": "07/07/2020 19:17:37",
      "content": "<p><a href=\"/aryanpandey1109\">@aryanpandey1109</a> - Yes, this could be a valid approach. You could train on TPUs in one notebook, and then export the trained model and upload it as an external data source into your inference notebook (with GPU or CPU enabled) to generate a <code>submission.csv</code> in its correct format. The key is that the notebook that generates your submission cannot have TPUs turned on. Also be sure that your submission does not hard code image/patient id's and can generate predictions on an unseen test set, or it will fail when run synchronously against the private test set.</p>",
      "rawMarkdown": "aryanpandey1109 - Yes, this could be a valid approach. You could train on TPUs in one notebook, and then export the trained model and upload it as an external data source into your inference notebook (with GPU or CPU enabled) to generate a `submission.csv` in its correct format. The key is that the notebook that generates your submission cannot have TPUs turned on. Also be sure that your submission does not hard code image/patient id's and can generate predictions on an unseen test set, or it will fail when run synchronously against the private test set.",
      "votes": null
    },
    {
      "id": "919268",
      "postDate": "07/07/2020 19:19:28",
      "content": "<p>This makes sense\nThank you so much</p>",
      "rawMarkdown": "This makes sense\nThank you so much",
      "votes": null
    },
    {
      "id": "973871",
      "postDate": "08/17/2020 15:16:30",
      "content": "<p><a href=\"https://www.kaggle.com/juliaelliott\" target=\"_blank\">@juliaelliott</a> Based on what You have stated, Can we train model/(multiple models) outside of Kaggle Notebooks. Then export model/models as external data source. Generate Inference/(Ensemble in case of multiple models) and generate submission ?</p>\n<p>Will it be considered valid?</p>\n<p>I am sorry if this is a dumb question. I am new to Kaggle. </p>\n<p>Just want to understand, how this format of competition is different than other non-notebook competitions. </p>\n<p>I was under the impression that models should be trained and inferred within 4 hours on GPU. But it seems to me that we can train the model outside and use 4 hours just for inference/ensemble/submission.</p>\n<p>Is my interpretation correct?</p>",
      "rawMarkdown": "juliaelliott Based on what You have stated, Can we train model/(multiple models) outside of Kaggle Notebooks. Then export model/models as external data source. Generate Inference/(Ensemble in case of multiple models) and generate submission ?\n\nWill it be considered valid?\n\nI am sorry if this is a dumb question. I am new to Kaggle. \n\nJust want to understand, how this format of competition is different than other non-notebook competitions. \n\nI was under the impression that models should be trained and inferred within 4 hours on GPU. But it seems to me that we can train the model outside and use 4 hours just for inference/ensemble/submission.\n\nIs my interpretation correct?",
      "votes": null
    },
    {
      "id": "974293",
      "postDate": "08/17/2020 21:14:03",
      "content": "<p>You can train your model however you want, on whatever equipment you want. No limitations.</p>\n<p>To make a submission, you must load your model in a notebook and run the model against the hidden test data. No TPU during Prediction. No Internet Access. Time/memory resources as described in the Overview/Rules. No preprocessing of test data, since you don't have access to it.</p>\n<p>Some other contests don't have any of these limitations. Some require you to run the entire training/prediction in a notebook.</p>",
      "rawMarkdown": "You can train your model however you want, on whatever equipment you want. No limitations.\n\nTo make a submission, you must load your model in a notebook and run the model against the hidden test data. No TPU during Prediction. No Internet Access. Time/memory resources as described in the Overview/Rules. No preprocessing of test data, since you don't have access to it.\n\nSome other contests don't have any of these limitations. Some require you to run the entire training/prediction in a notebook.",
      "votes": null
    },
    {
      "id": "975103",
      "postDate": "08/18/2020 06:39:22",
      "content": "<p>Thanks Richard</p>",
      "rawMarkdown": "Thanks Richard",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 973871,
      "author_name": "Oldmonk3030",
      "author_url": "",
      "post_date": "08/17/2020 15:16:30",
      "content": "<p><a href=\"https://www.kaggle.com/juliaelliott\" target=\"_blank\">@juliaelliott</a> Based on what You have stated, Can we train model/(multiple models) outside of Kaggle Notebooks. Then export model/models as external data source. Generate Inference/(Ensemble in case of multiple models) and generate submission ?</p>\n<p>Will it be considered valid?</p>\n<p>I am sorry if this is a dumb question. I am new to Kaggle. </p>\n<p>Just want to understand, how this format of competition is different than other non-notebook competitions. </p>\n<p>I was under the impression that models should be trained and inferred within 4 hours on GPU. But it seems to me that we can train the model outside and use 4 hours just for inference/ensemble/submission.</p>\n<p>Is my interpretation correct?</p>",
      "votes": null,
      "replies": [
        {
          "id": 974293,
          "author_name": "richardepstein",
          "author_url": "",
          "post_date": "08/17/2020 21:14:03",
          "content": "<p>You can train your model however you want, on whatever equipment you want. No limitations.</p>\n<p>To make a submission, you must load your model in a notebook and run the model against the hidden test data. No TPU during Prediction. No Internet Access. Time/memory resources as described in the Overview/Rules. No preprocessing of test data, since you don't have access to it.</p>\n<p>Some other contests don't have any of these limitations. Some require you to run the entire training/prediction in a notebook.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 975103,
      "author_name": "Oldmonk3030",
      "author_url": "",
      "post_date": "08/18/2020 06:39:22",
      "content": "<p>Thanks Richard</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 919262,
      "author_name": "juliaelliott",
      "author_url": "",
      "post_date": "07/07/2020 19:17:37",
      "content": "<p><a href=\"/aryanpandey1109\">@aryanpandey1109</a> - Yes, this could be a valid approach. You could train on TPUs in one notebook, and then export the trained model and upload it as an external data source into your inference notebook (with GPU or CPU enabled) to generate a <code>submission.csv</code> in its correct format. The key is that the notebook that generates your submission cannot have TPUs turned on. Also be sure that your submission does not hard code image/patient id's and can generate predictions on an unseen test set, or it will fail when run synchronously against the private test set.</p>",
      "votes": null,
      "replies": [
        {
          "id": 919268,
          "author_name": "aryanpandey1109",
          "author_url": "",
          "post_date": "07/07/2020 19:19:28",
          "content": "<p>This makes sense\nThank you so much</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "919190": "The Code requirements say that the notebook through which I submit cannot be a TPU notebook. But it also says that I can use TPUs for training models. So if I train my model with a TPU in one notebook, just load the submission file onto another notebook and submit via this new notebook, is my submission valid?",
    "919262": "aryanpandey1109 - Yes, this could be a valid approach. You could train on TPUs in one notebook, and then export the trained model and upload it as an external data source into your inference notebook (with GPU or CPU enabled) to generate a `submission.csv` in its correct format. The key is that the notebook that generates your submission cannot have TPUs turned on. Also be sure that your submission does not hard code image/patient id's and can generate predictions on an unseen test set, or it will fail when run synchronously against the private test set.",
    "919268": "This makes sense\nThank you so much",
    "973871": "juliaelliott Based on what You have stated, Can we train model/(multiple models) outside of Kaggle Notebooks. Then export model/models as external data source. Generate Inference/(Ensemble in case of multiple models) and generate submission ?\n\nWill it be considered valid?\n\nI am sorry if this is a dumb question. I am new to Kaggle. \n\nJust want to understand, how this format of competition is different than other non-notebook competitions. \n\nI was under the impression that models should be trained and inferred within 4 hours on GPU. But it seems to me that we can train the model outside and use 4 hours just for inference/ensemble/submission.\n\nIs my interpretation correct?",
    "974293": "You can train your model however you want, on whatever equipment you want. No limitations.\n\nTo make a submission, you must load your model in a notebook and run the model against the hidden test data. No TPU during Prediction. No Internet Access. Time/memory resources as described in the Overview/Rules. No preprocessing of test data, since you don't have access to it.\n\nSome other contests don't have any of these limitations. Some require you to run the entire training/prediction in a notebook.",
    "975103": "Thanks Richard"
  },
  "source": "meta"
}