{
  "id": 295013,
  "title": "Submitting the trained model",
  "url": "/competitions/g-research-crypto-forecasting/discussion/295013",
  "author_name": "",
  "post_date": "2021-12-14T00:42:18.925762Z",
  "votes": 9,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I need some help in submitting my model. I've read several Kaggle posts about submission but I'm still confused with the time series API.</p>\n<p>Thanks to the <a href=\"https://www.kaggle.com/cstein06/tutorial-to-the-g-research-crypto-competition\" target=\"_blank\">introductory tutorial</a>, I have managed to train and test my model successfully.</p>\n<p><code>my_model = MyModel()</code></p>\n<p>The <a href=\"https://www.kaggle.com/sohier/basic-submission-template/notebook\" target=\"_blank\">basic submission template</a> is given as:</p>\n<p><code>import gresearch_crypto</code><br>\n<code>env = gresearch_crypto.make_env()</code><br>\n<code>iter_test = env.iter_test()</code><br>\n<code>for (test_df, sample_prediction_df) in iter_test:</code><br>\n <code>sample_prediction_df['Target'] = 0</code><br>\n  <code>env.predict(sample_prediction_df)</code></p>\n<p>How do I include <code>my_model</code> into the given submission template in order to generate the <code>submission.csv</code> file?</p>\n<p>I'm sure I can include the submission template snippet in a cell at the end of my notebook and be able to generate the <code>submission.csv</code> but I would think that submission would not have included  my model.</p>\n<p>Thank you for your help.</p>",
  "messages": [
    {
      "id": "1617219",
      "postDate": "12/14/2021 00:42:18",
      "content": "<p>I need some help in submitting my model. I've read several Kaggle posts about submission but I'm still confused with the time series API.</p>\n<p>Thanks to the <a href=\"https://www.kaggle.com/cstein06/tutorial-to-the-g-research-crypto-competition\" target=\"_blank\">introductory tutorial</a>, I have managed to train and test my model successfully.</p>\n<p><code>my_model = MyModel()</code></p>\n<p>The <a href=\"https://www.kaggle.com/sohier/basic-submission-template/notebook\" target=\"_blank\">basic submission template</a> is given as:</p>\n<p><code>import gresearch_crypto</code><br>\n<code>env = gresearch_crypto.make_env()</code><br>\n<code>iter_test = env.iter_test()</code><br>\n<code>for (test_df, sample_prediction_df) in iter_test:</code><br>\n <code>sample_prediction_df['Target'] = 0</code><br>\n  <code>env.predict(sample_prediction_df)</code></p>\n<p>How do I include <code>my_model</code> into the given submission template in order to generate the <code>submission.csv</code> file?</p>\n<p>I'm sure I can include the submission template snippet in a cell at the end of my notebook and be able to generate the <code>submission.csv</code> but I would think that submission would not have included  my model.</p>\n<p>Thank you for your help.</p>",
      "rawMarkdown": "I need some help in submitting my model. I've read several Kaggle posts about submission but I'm still confused with the time series API.\n\nThanks to the [introductory tutorial](https://www.kaggle.com/cstein06/tutorial-to-the-g-research-crypto-competition), I have managed to train and test my model successfully.\n\n`my_model = MyModel()`\n\nThe [basic submission template](https://www.kaggle.com/sohier/basic-submission-template/notebook) is given as:\n\n`import gresearch_crypto`\n`env = gresearch_crypto.make_env()`\n`iter_test = env.iter_test()`\n`for (test_df, sample_prediction_df) in iter_test:`\n `          sample_prediction_df['Target'] = 0`\n  `         env.predict(sample_prediction_df)`\n\nHow do I include `my_model` into the given submission template in order to generate the `submission.csv` file?\n\nI'm sure I can include the submission template snippet in a cell at the end of my notebook and be able to generate the `submission.csv` but I would think that submission would not have included  my model.\n\nThank you for your help.",
      "votes": null
    },
    {
      "id": "1617471",
      "postDate": "12/14/2021 05:39:21",
      "content": "<pre><code>my_model = MyModel()\nimport gresearch_crypto\nenv = gresearch_crypto.make_env()\niter_test = env.iter_test()\nfor (test_df, sample_prediction_df) in iter_test:\n    pred = my_model.predict(test_df)\n    sample_prediction_df['Target'] = pred\n    env.predict(sample_prediction_df)\n</code></pre>",
      "rawMarkdown": "```\nmy_model = MyModel()\nimport gresearch_crypto\nenv = gresearch_crypto.make_env()\niter_test = env.iter_test()\nfor (test_df, sample_prediction_df) in iter_test:\n    pred = my_model.predict(test_df)\n    sample_prediction_df['Target'] = pred\n    env.predict(sample_prediction_df)\n```",
      "votes": null
    },
    {
      "id": "1618331",
      "postDate": "12/14/2021 22:38:47",
      "content": "<p>This has been quite helpful. Thank you.</p>",
      "rawMarkdown": "This has been quite helpful. Thank you.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1617471,
      "author_name": "yus002",
      "author_url": "",
      "post_date": "12/14/2021 05:39:21",
      "content": "<pre><code>my_model = MyModel()\nimport gresearch_crypto\nenv = gresearch_crypto.make_env()\niter_test = env.iter_test()\nfor (test_df, sample_prediction_df) in iter_test:\n    pred = my_model.predict(test_df)\n    sample_prediction_df['Target'] = pred\n    env.predict(sample_prediction_df)\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 1618331,
          "author_name": "ycliffd",
          "author_url": "",
          "post_date": "12/14/2021 22:38:47",
          "content": "<p>This has been quite helpful. Thank you.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1617219": "I need some help in submitting my model. I've read several Kaggle posts about submission but I'm still confused with the time series API.\n\nThanks to the [introductory tutorial](https://www.kaggle.com/cstein06/tutorial-to-the-g-research-crypto-competition), I have managed to train and test my model successfully.\n\n`my_model = MyModel()`\n\nThe [basic submission template](https://www.kaggle.com/sohier/basic-submission-template/notebook) is given as:\n\n`import gresearch_crypto`\n`env = gresearch_crypto.make_env()`\n`iter_test = env.iter_test()`\n`for (test_df, sample_prediction_df) in iter_test:`\n `          sample_prediction_df['Target'] = 0`\n  `         env.predict(sample_prediction_df)`\n\nHow do I include `my_model` into the given submission template in order to generate the `submission.csv` file?\n\nI'm sure I can include the submission template snippet in a cell at the end of my notebook and be able to generate the `submission.csv` but I would think that submission would not have included  my model.\n\nThank you for your help.",
    "1617471": "```\nmy_model = MyModel()\nimport gresearch_crypto\nenv = gresearch_crypto.make_env()\niter_test = env.iter_test()\nfor (test_df, sample_prediction_df) in iter_test:\n    pred = my_model.predict(test_df)\n    sample_prediction_df['Target'] = pred\n    env.predict(sample_prediction_df)\n```",
    "1618331": "This has been quite helpful. Thank you."
  },
  "source": "meta"
}