{
  "id": 302834,
  "title": "Submission Question",
  "url": "/competitions/g-research-crypto-forecasting/discussion/302834",
  "author_name": "",
  "post_date": "2022-01-24T14:05:43.120428Z",
  "votes": 2,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hi, did anyone know how to submit the code?</p>\n<p>We found an API introduction, the link is here <a href=\"url\" target=\"_blank\">https://www.kaggle.com/sohier/detailed-api-introduction/notebook</a>. We followed step by step and got an error on this part:<br>\nfor (test_df, sample_prediction_df) in iter_test:<br>\n    sample_prediction_df['Target'] = tgt_1_model.predict(test_df)<br>\n    env.predict(sample_prediction_df)</p>\n<p>The error we got is like that and we have no idea how to solve it:</p>\n<h2>You must call <code>predict()</code> successfully before you can continue with <code>iter_test()</code></h2>\n<p>TypeError                                 Traceback (most recent call last)<br>\n/tmp/ipykernel_33/289213735.py in <br>\n----&gt; 1 for (test_df, sample_prediction_df) in iter_test:<br>\n      2     test_df = test_df.set_index('timestamp')<br>\n      3     test_df.index = pd.to_datetime(test_df.index, unit='s')<br>\n      4     test_df.drop([\"Asset_ID\"], axis = 'columns', inplace = True)<br>\n      5     print(test_df)</p>\n<p>TypeError: cannot unpack non-iterable NoneType object</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": "1662752",
      "postDate": "01/24/2022 14:05:43",
      "content": "<p>Hi, did anyone know how to submit the code?</p>\n<p>We found an API introduction, the link is here <a href=\"url\" target=\"_blank\">https://www.kaggle.com/sohier/detailed-api-introduction/notebook</a>. We followed step by step and got an error on this part:<br>\nfor (test_df, sample_prediction_df) in iter_test:<br>\n    sample_prediction_df['Target'] = tgt_1_model.predict(test_df)<br>\n    env.predict(sample_prediction_df)</p>\n<p>The error we got is like that and we have no idea how to solve it:</p>\n<h2>You must call <code>predict()</code> successfully before you can continue with <code>iter_test()</code></h2>\n<p>TypeError                                 Traceback (most recent call last)<br>\n/tmp/ipykernel_33/289213735.py in <br>\n----&gt; 1 for (test_df, sample_prediction_df) in iter_test:<br>\n      2     test_df = test_df.set_index('timestamp')<br>\n      3     test_df.index = pd.to_datetime(test_df.index, unit='s')<br>\n      4     test_df.drop([\"Asset_ID\"], axis = 'columns', inplace = True)<br>\n      5     print(test_df)</p>\n<p>TypeError: cannot unpack non-iterable NoneType object</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 how to submit the code?\n\nWe found an API introduction, the link is here [https://www.kaggle.com/sohier/detailed-api-introduction/notebook](url). We followed step by step and got an error on this part:\nfor (test_df, sample_prediction_df) in iter_test:\n    sample_prediction_df['Target'] = tgt_1_model.predict(test_df)\n    env.predict(sample_prediction_df)\n\nThe error we got is like that and we have no idea how to solve it:\nYou must call `predict()` successfully before you can continue with `iter_test()`\n---------------------------------------------------------------------------\nTypeError                                 Traceback (most recent call last)\n/tmp/ipykernel_33/289213735.py in <module>\n----> 1 for (test_df, sample_prediction_df) in iter_test:\n      2     test_df = test_df.set_index('timestamp')\n      3     test_df.index = pd.to_datetime(test_df.index, unit='s')\n      4     test_df.drop([\"Asset_ID\"], axis = 'columns', inplace = True)\n      5     print(test_df)\n\nTypeError: cannot unpack non-iterable NoneType object\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": "1664104",
      "postDate": "01/25/2022 17:43:11",
      "content": "<p>Make sure that before you loop back you include your prediction submission in the env.predict(sample_prediction), it wont allow you to loop through the API unless you make a prediction.</p>",
      "rawMarkdown": "Make sure that before you loop back you include your prediction submission in the env.predict(sample_prediction), it wont allow you to loop through the API unless you make a prediction.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1664104,
      "author_name": "jonnydossantos",
      "author_url": "",
      "post_date": "01/25/2022 17:43:11",
      "content": "<p>Make sure that before you loop back you include your prediction submission in the env.predict(sample_prediction), it wont allow you to loop through the API unless you make a prediction.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1662752": "Hi, did anyone know how to submit the code?\n\nWe found an API introduction, the link is here [https://www.kaggle.com/sohier/detailed-api-introduction/notebook](url). We followed step by step and got an error on this part:\nfor (test_df, sample_prediction_df) in iter_test:\n    sample_prediction_df['Target'] = tgt_1_model.predict(test_df)\n    env.predict(sample_prediction_df)\n\nThe error we got is like that and we have no idea how to solve it:\nYou must call `predict()` successfully before you can continue with `iter_test()`\n---------------------------------------------------------------------------\nTypeError                                 Traceback (most recent call last)\n/tmp/ipykernel_33/289213735.py in <module>\n----> 1 for (test_df, sample_prediction_df) in iter_test:\n      2     test_df = test_df.set_index('timestamp')\n      3     test_df.index = pd.to_datetime(test_df.index, unit='s')\n      4     test_df.drop([\"Asset_ID\"], axis = 'columns', inplace = True)\n      5     print(test_df)\n\nTypeError: cannot unpack non-iterable NoneType object\n\nWe are kind of confused about how to deal with the submission file. Thanks in advance for someone who is willing to help.",
    "1664104": "Make sure that before you loop back you include your prediction submission in the env.predict(sample_prediction), it wont allow you to loop through the API unless you make a prediction."
  },
  "source": "meta"
}