{
  "id": 302547,
  "title": "Submission Question",
  "url": "/competitions/g-research-crypto-forecasting/discussion/302547",
  "author_name": "",
  "post_date": "2022-01-23T03:37:57.908654200Z",
  "votes": 4,
  "comment_count": 8,
  "views": 0,
  "content": "<p>Hi, did anyone know whether we need to set up the iter_test, or write our prediction as a prediction dataframe as described in the following API given in the competition:</p>\n<p>for (test_df, sample_prediction_df) in iter_test:<br>\n    sample_prediction_df['Target'] = 0<br>\n    env.predict(sample_prediction_df)</p>\n<p>We are kind of confused about how to deal with the submission file. Thanks in advance for someone who is willing to help. </p>",
  "messages": [
    {
      "id": "1660866",
      "postDate": "01/23/2022 03:37:57",
      "content": "<p>Hi, did anyone know whether we need to set up the iter_test, or write our prediction as a prediction dataframe as described in the following API given in the competition:</p>\n<p>for (test_df, sample_prediction_df) in iter_test:<br>\n    sample_prediction_df['Target'] = 0<br>\n    env.predict(sample_prediction_df)</p>\n<p>We are kind of confused about how to deal with the submission file. Thanks in advance for someone who is willing to help. </p>",
      "rawMarkdown": "Hi, did anyone know whether we need to set up the iter_test, or write our prediction as a prediction dataframe as described in the following API given in the competition:\n\n\nfor (test_df, sample_prediction_df) in iter_test:\n    sample_prediction_df['Target'] = 0\n    env.predict(sample_prediction_df)\n\nWe are kind of confused about how to deal with the submission file. Thanks in advance for someone who is willing to help.",
      "votes": null
    },
    {
      "id": "1660924",
      "postDate": "01/23/2022 05:15:57",
      "content": "<p>Hi,</p>\n<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": "Hi,\n\n```\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": "1661121",
      "postDate": "01/23/2022 08:35:30",
      "content": "<p>As <a href=\"https://www.kaggle.com/yus002\" target=\"_blank\">@yus002</a> said, you can find the corresponding available code!</p>",
      "rawMarkdown": "As @yus002 said, you can find the corresponding available code!",
      "votes": null
    },
    {
      "id": "1661234",
      "postDate": "01/23/2022 10:19:24",
      "content": "<p>Hi,</p>\n<p>test_df always contains only one group or may contain several groups?</p>\n<p>We have to call env.predict once for each group? </p>\n<p>Thanks</p>",
      "rawMarkdown": "Hi,\n\ntest_df always contains only one group or may contain several groups?\n\nWe have to call env.predict once for each group? \n\nThanks",
      "votes": null
    },
    {
      "id": "1661430",
      "postDate": "01/23/2022 13:16:28",
      "content": "<p>Check out the official <a href=\"https://www.kaggle.com/sohier/detailed-api-introduction\" target=\"_blank\">detailed introduction to the API</a>. All of this is explained there.</p>",
      "rawMarkdown": "Check out the official [detailed introduction to the API](https://www.kaggle.com/sohier/detailed-api-introduction). All of this is explained there.",
      "votes": null
    },
    {
      "id": "1661668",
      "postDate": "01/23/2022 15:51:21",
      "content": "<p>To confirm, no CSV needs to be written out and calling env.predict() is all that needs to be done to store predictions? And the \"group_num\" column that is in the provided \"example_sample_submission.csv\" should be ignored and not also added to sample_prediction_df before calling predict?</p>\n<p>I know the API Introduction includes only this code you provided, without any CSV or group_num column, but I am trying to double check and diagnose a submission error I am receiving. </p>\n<p>Thank you if you are able to answer these points assuming you have a working submission. </p>",
      "rawMarkdown": "To confirm, no CSV needs to be written out and calling env.predict() is all that needs to be done to store predictions? And the \"group_num\" column that is in the provided \"example_sample_submission.csv\" should be ignored and not also added to sample_prediction_df before calling predict?\n\nI know the API Introduction includes only this code you provided, without any CSV or group_num column, but I am trying to double check and diagnose a submission error I am receiving. \n\nThank you if you are able to answer these points assuming you have a working submission.",
      "votes": null
    },
    {
      "id": "1661942",
      "postDate": "01/23/2022 20:50:10",
      "content": "<blockquote>\n  <p>no CSV needs to be written out and calling env.predict() is all that needs to be done to store prediction</p>\n</blockquote>\n<p>correct</p>",
      "rawMarkdown": ">  no CSV needs to be written out and calling env.predict() is all that needs to be done to store prediction\n\ncorrect",
      "votes": null
    },
    {
      "id": "1661943",
      "postDate": "01/23/2022 20:52:17",
      "content": "<blockquote>\n  <p>And the \"group_num\" column that is in the provided \"example_sample_submission.csv\" should be ignored and not also added to sample_prediction_df before calling predict</p>\n</blockquote>\n<p>I have no idea. You can use display(test_df) and display(sample_prediction_df) to check what these dataframes look like.</p>",
      "rawMarkdown": "> And the \"group_num\" column that is in the provided \"example_sample_submission.csv\" should be ignored and not also added to sample_prediction_df before calling predict\n\nI have no idea. You can use display(test_df) and display(sample_prediction_df) to check what these dataframes look like.",
      "votes": null
    },
    {
      "id": "1662402",
      "postDate": "01/24/2022 08:51:00",
      "content": "<p>We use the same code to predict the test data. But we got the error :You must call <code>predict()</code> successfully before you can continue with <code>iter_test()</code>.</p>",
      "rawMarkdown": "We use the same code to predict the test data. But we got the error :You must call `predict()` successfully before you can continue with `iter_test()`.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1660924,
      "author_name": "yus002",
      "author_url": "",
      "post_date": "01/23/2022 05:15:57",
      "content": "<p>Hi,</p>\n<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": 1661668,
          "author_name": "ajaxdata",
          "author_url": "",
          "post_date": "01/23/2022 15:51:21",
          "content": "<p>To confirm, no CSV needs to be written out and calling env.predict() is all that needs to be done to store predictions? And the \"group_num\" column that is in the provided \"example_sample_submission.csv\" should be ignored and not also added to sample_prediction_df before calling predict?</p>\n<p>I know the API Introduction includes only this code you provided, without any CSV or group_num column, but I am trying to double check and diagnose a submission error I am receiving. </p>\n<p>Thank you if you are able to answer these points assuming you have a working submission. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1661942,
          "author_name": "yus002",
          "author_url": "",
          "post_date": "01/23/2022 20:50:10",
          "content": "<blockquote>\n  <p>no CSV needs to be written out and calling env.predict() is all that needs to be done to store prediction</p>\n</blockquote>\n<p>correct</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1661943,
          "author_name": "yus002",
          "author_url": "",
          "post_date": "01/23/2022 20:52:17",
          "content": "<blockquote>\n  <p>And the \"group_num\" column that is in the provided \"example_sample_submission.csv\" should be ignored and not also added to sample_prediction_df before calling predict</p>\n</blockquote>\n<p>I have no idea. You can use display(test_df) and display(sample_prediction_df) to check what these dataframes look like.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1662402,
          "author_name": "qinxx19111",
          "author_url": "",
          "post_date": "01/24/2022 08:51:00",
          "content": "<p>We use the same code to predict the test data. But we got the error :You must call <code>predict()</code> successfully before you can continue with <code>iter_test()</code>.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1661121,
      "author_name": "",
      "author_url": "",
      "post_date": "01/23/2022 08:35:30",
      "content": "<p>As <a href=\"https://www.kaggle.com/yus002\" target=\"_blank\">@yus002</a> said, you can find the corresponding available code!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1661234,
      "author_name": "ricardocsag",
      "author_url": "",
      "post_date": "01/23/2022 10:19:24",
      "content": "<p>Hi,</p>\n<p>test_df always contains only one group or may contain several groups?</p>\n<p>We have to call env.predict once for each group? </p>\n<p>Thanks</p>",
      "votes": null,
      "replies": [
        {
          "id": 1661430,
          "author_name": "jagofc",
          "author_url": "",
          "post_date": "01/23/2022 13:16:28",
          "content": "<p>Check out the official <a href=\"https://www.kaggle.com/sohier/detailed-api-introduction\" target=\"_blank\">detailed introduction to the API</a>. All of this is explained there.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1660866": "Hi, did anyone know whether we need to set up the iter_test, or write our prediction as a prediction dataframe as described in the following API given in the competition:\n\n\nfor (test_df, sample_prediction_df) in iter_test:\n    sample_prediction_df['Target'] = 0\n    env.predict(sample_prediction_df)\n\nWe are kind of confused about how to deal with the submission file. Thanks in advance for someone who is willing to help.",
    "1660924": "Hi,\n\n```\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```",
    "1661121": "As @yus002 said, you can find the corresponding available code!",
    "1661234": "Hi,\n\ntest_df always contains only one group or may contain several groups?\n\nWe have to call env.predict once for each group? \n\nThanks",
    "1661430": "Check out the official [detailed introduction to the API](https://www.kaggle.com/sohier/detailed-api-introduction). All of this is explained there.",
    "1661668": "To confirm, no CSV needs to be written out and calling env.predict() is all that needs to be done to store predictions? And the \"group_num\" column that is in the provided \"example_sample_submission.csv\" should be ignored and not also added to sample_prediction_df before calling predict?\n\nI know the API Introduction includes only this code you provided, without any CSV or group_num column, but I am trying to double check and diagnose a submission error I am receiving. \n\nThank you if you are able to answer these points assuming you have a working submission.",
    "1661942": ">  no CSV needs to be written out and calling env.predict() is all that needs to be done to store prediction\n\ncorrect",
    "1661943": "> And the \"group_num\" column that is in the provided \"example_sample_submission.csv\" should be ignored and not also added to sample_prediction_df before calling predict\n\nI have no idea. You can use display(test_df) and display(sample_prediction_df) to check what these dataframes look like.",
    "1662402": "We use the same code to predict the test data. But we got the error :You must call `predict()` successfully before you can continue with `iter_test()`."
  },
  "source": "meta"
}