{
  "id": 288557,
  "title": "Submission Scoring Error",
  "url": "/competitions/g-research-crypto-forecasting/discussion/288557",
  "author_name": "FatihAslan",
  "post_date": "2021-11-17T23:51:59.323000",
  "votes": 6,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hello everyone,</p>\n<p>I am having this error and could not submit a valid prediction since the start of the competition. I use pytorch with CUDA enabled. My network outputs a tensor, I cast it to the dataframe and submit my predictions but everytime I got submission scoring error. If I fill dataframe directly with zeros I can submit my predictions, as in the submission guideline.<br>\nI prepared a dummy notebook to try it with all zeros tensor, but it has the same error. The dummy notebook is here: <a href=\"https://www.kaggle.com/fatihaslan/error\" target=\"_blank\">https://www.kaggle.com/fatihaslan/error</a><br>\nI got the same error with <code>sample_prediction_df['Target'] = output[0, :, -1].data.cpu()</code>, but the one with <br>\n<code>\nfor i in range(14):\n    sample_prediction_df['Target'][i] = output[0, i, -1].cpu().item()\n</code><br>\nis not finished yet.</p>\n<p>Any help is appreciated since not being able to submit predictions is frustrating.</p>\n<p>Edit:<br>\nPredict using .item() worked on dummy notebook. However, it takes too much time and timeout error occurs when doing valid predictions.</p>",
  "messages": [
    {
      "id": 1586253,
      "postDate": "2021-11-17T23:51:59.323Z",
      "content": "<p>Hello everyone,</p>\n<p>I am having this error and could not submit a valid prediction since the start of the competition. I use pytorch with CUDA enabled. My network outputs a tensor, I cast it to the dataframe and submit my predictions but everytime I got submission scoring error. If I fill dataframe directly with zeros I can submit my predictions, as in the submission guideline.<br>\nI prepared a dummy notebook to try it with all zeros tensor, but it has the same error. The dummy notebook is here: <a href=\"https://www.kaggle.com/fatihaslan/error\" target=\"_blank\">https://www.kaggle.com/fatihaslan/error</a><br>\nI got the same error with <code>sample_prediction_df['Target'] = output[0, :, -1].data.cpu()</code>, but the one with <br>\n<code>\nfor i in range(14):\n    sample_prediction_df['Target'][i] = output[0, i, -1].cpu().item()\n</code><br>\nis not finished yet.</p>\n<p>Any help is appreciated since not being able to submit predictions is frustrating.</p>\n<p>Edit:<br>\nPredict using .item() worked on dummy notebook. However, it takes too much time and timeout error occurs when doing valid predictions.</p>",
      "rawMarkdown": "Hello everyone,\n\nI am having this error and could not submit a valid prediction since the start of the competition. I use pytorch with CUDA enabled. My network outputs a tensor, I cast it to the dataframe and submit my predictions but everytime I got submission scoring error. If I fill dataframe directly with zeros I can submit my predictions, as in the submission guideline.\nI prepared a dummy notebook to try it with all zeros tensor, but it has the same error. The dummy notebook is here: https://www.kaggle.com/fatihaslan/error\nI got the same error with `sample_prediction_df['Target'] = output[0, :, -1].data.cpu()`, but the one with \n`\nfor i in range(14):\n    sample_prediction_df['Target'][i] = output[0, i, -1].cpu().item()\n`\nis not finished yet.\n\nAny help is appreciated since not being able to submit predictions is frustrating.\n\nEdit:\nPredict using .item() worked on dummy notebook. However, it takes too much time and timeout error occurs when doing valid predictions.",
      "votes": 6
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1586253": "Hello everyone,\n\nI am having this error and could not submit a valid prediction since the start of the competition. I use pytorch with CUDA enabled. My network outputs a tensor, I cast it to the dataframe and submit my predictions but everytime I got submission scoring error. If I fill dataframe directly with zeros I can submit my predictions, as in the submission guideline.\nI prepared a dummy notebook to try it with all zeros tensor, but it has the same error. The dummy notebook is here: https://www.kaggle.com/fatihaslan/error\nI got the same error with `sample_prediction_df['Target'] = output[0, :, -1].data.cpu()`, but the one with \n`\nfor i in range(14):\n    sample_prediction_df['Target'][i] = output[0, i, -1].cpu().item()\n`\nis not finished yet.\n\nAny help is appreciated since not being able to submit predictions is frustrating.\n\nEdit:\nPredict using .item() worked on dummy notebook. However, it takes too much time and timeout error occurs when doing valid predictions."
  }
}