{
  "id": 194252,
  "title": "Is anybody experience this? Loading a serialized model during submission results in a failed grading.",
  "url": "/competitions/riiid-test-answer-prediction/discussion/194252",
  "author_name": "",
  "post_date": "2020-10-31T14:33:11.511042500Z",
  "votes": 2,
  "comment_count": 6,
  "views": 0,
  "content": "<p>To better organize my work, I separated my workflow into different kernels. The submission kernel just imports the trained PyTorch model, and performs the prediction. I thought this would speed up grading also.</p>\n<p>However even that the kernel works perfectly on the example test set, it results in a submission failure. When I use the same code but in one notebook (Training, and prediction),  it gets graded correctly.</p>\n<p>I thought that this is a curious behavior i.e. failure in grading when loading a serialized PyTorch model. Is anybody experiencing this ?  </p>",
  "messages": [
    {
      "id": "1065633",
      "postDate": "10/31/2020 14:33:11",
      "content": "<p>To better organize my work, I separated my workflow into different kernels. The submission kernel just imports the trained PyTorch model, and performs the prediction. I thought this would speed up grading also.</p>\n<p>However even that the kernel works perfectly on the example test set, it results in a submission failure. When I use the same code but in one notebook (Training, and prediction),  it gets graded correctly.</p>\n<p>I thought that this is a curious behavior i.e. failure in grading when loading a serialized PyTorch model. Is anybody experiencing this ?  </p>",
      "rawMarkdown": "To better organize my work, I separated my workflow into different kernels. The submission kernel just imports the trained PyTorch model, and performs the prediction. I thought this would speed up grading also.\n\nHowever even that the kernel works perfectly on the example test set, it results in a submission failure. When I use the same code but in one notebook (Training, and prediction),  it gets graded correctly.\n\nI thought that this is a curious behavior i.e. failure in grading when loading a serialized PyTorch model. Is anybody experiencing this ?",
      "votes": null
    },
    {
      "id": "1065644",
      "postDate": "10/31/2020 14:43:47",
      "content": "<p>This is strange. Does it give an error immediately or after a few hours?</p>",
      "rawMarkdown": "This is strange. Does it give an error immediately or after a few hours?",
      "votes": null
    },
    {
      "id": "1065664",
      "postDate": "10/31/2020 15:11:27",
      "content": "<p>On average, after 5 - 10 minutes.</p>",
      "rawMarkdown": "On average, after 5 - 10 minutes.",
      "votes": null
    },
    {
      "id": "1065675",
      "postDate": "10/31/2020 15:18:58",
      "content": "<p>Most likely, your notebook doesn't see the \"model file\". When you click Submit , you see the file with weights in the 'Input' section? If you don't see it, the dataset wasn't added …. If you see this file, I don't know :) Then try to save the weights in one Notepad, then read them and make a prediction (to check whether the model is loaded correctly)</p>",
      "rawMarkdown": "Most likely, your notebook doesn't see the \"model file\". When you click Submit , you see the file with weights in the 'Input' section? If you don't see it, the dataset wasn't added .... If you see this file, I don't know :) Then try to save the weights in one Notepad, then read them and make a prediction (to check whether the model is loaded correctly)",
      "votes": null
    },
    {
      "id": "1065698",
      "postDate": "10/31/2020 15:49:19",
      "content": "<p>The file exists in the input folder, I shared with you the submit notebook, and please tell me if you see something that I don't see. I tried to re-sumbit now, with an error again.</p>\n<p><a href=\"https://www.kaggle.com/abdessalemboukil/submit\" target=\"_blank\">https://www.kaggle.com/abdessalemboukil/submit</a><br>\nThanks!</p>",
      "rawMarkdown": "The file exists in the input folder, I shared with you the submit notebook, and please tell me if you see something that I don't see. I tried to re-sumbit now, with an error again.\n\nhttps://www.kaggle.com/abdessalemboukil/submit\nThanks!",
      "votes": null
    },
    {
      "id": "1065721",
      "postDate": "10/31/2020 16:26:26",
      "content": "<p>I don't see any reason yet… The only thing I would do is-if your model doesn't use lectures, can only select questions at once? (before 'preprocess(test_data, features)…'</p>",
      "rawMarkdown": "I don't see any reason yet... The only thing I would do is-if your model doesn't use lectures, can only select questions at once? (before 'preprocess(test_data, features)...'",
      "votes": null
    },
    {
      "id": "1065731",
      "postDate": "10/31/2020 16:53:43",
      "content": "<p>It seem not to make a difference in my other notebook. This is an odd behavior.</p>",
      "rawMarkdown": "It seem not to make a difference in my other notebook. This is an odd behavior.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1065644,
      "author_name": "sapr3s",
      "author_url": "",
      "post_date": "10/31/2020 14:43:47",
      "content": "<p>This is strange. Does it give an error immediately or after a few hours?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1065664,
          "author_name": "abdessalemboukil",
          "author_url": "",
          "post_date": "10/31/2020 15:11:27",
          "content": "<p>On average, after 5 - 10 minutes.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1065675,
          "author_name": "sapr3s",
          "author_url": "",
          "post_date": "10/31/2020 15:18:58",
          "content": "<p>Most likely, your notebook doesn't see the \"model file\". When you click Submit , you see the file with weights in the 'Input' section? If you don't see it, the dataset wasn't added …. If you see this file, I don't know :) Then try to save the weights in one Notepad, then read them and make a prediction (to check whether the model is loaded correctly)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1065698,
          "author_name": "abdessalemboukil",
          "author_url": "",
          "post_date": "10/31/2020 15:49:19",
          "content": "<p>The file exists in the input folder, I shared with you the submit notebook, and please tell me if you see something that I don't see. I tried to re-sumbit now, with an error again.</p>\n<p><a href=\"https://www.kaggle.com/abdessalemboukil/submit\" target=\"_blank\">https://www.kaggle.com/abdessalemboukil/submit</a><br>\nThanks!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1065721,
          "author_name": "sapr3s",
          "author_url": "",
          "post_date": "10/31/2020 16:26:26",
          "content": "<p>I don't see any reason yet… The only thing I would do is-if your model doesn't use lectures, can only select questions at once? (before 'preprocess(test_data, features)…'</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1065731,
          "author_name": "abdessalemboukil",
          "author_url": "",
          "post_date": "10/31/2020 16:53:43",
          "content": "<p>It seem not to make a difference in my other notebook. This is an odd behavior.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1065633": "To better organize my work, I separated my workflow into different kernels. The submission kernel just imports the trained PyTorch model, and performs the prediction. I thought this would speed up grading also.\n\nHowever even that the kernel works perfectly on the example test set, it results in a submission failure. When I use the same code but in one notebook (Training, and prediction),  it gets graded correctly.\n\nI thought that this is a curious behavior i.e. failure in grading when loading a serialized PyTorch model. Is anybody experiencing this ?",
    "1065644": "This is strange. Does it give an error immediately or after a few hours?",
    "1065664": "On average, after 5 - 10 minutes.",
    "1065675": "Most likely, your notebook doesn't see the \"model file\". When you click Submit , you see the file with weights in the 'Input' section? If you don't see it, the dataset wasn't added .... If you see this file, I don't know :) Then try to save the weights in one Notepad, then read them and make a prediction (to check whether the model is loaded correctly)",
    "1065698": "The file exists in the input folder, I shared with you the submit notebook, and please tell me if you see something that I don't see. I tried to re-sumbit now, with an error again.\n\nhttps://www.kaggle.com/abdessalemboukil/submit\nThanks!",
    "1065721": "I don't see any reason yet... The only thing I would do is-if your model doesn't use lectures, can only select questions at once? (before 'preprocess(test_data, features)...'",
    "1065731": "It seem not to make a difference in my other notebook. This is an odd behavior."
  },
  "source": "meta"
}