{
  "id": 145219,
  "title": "How to submit for unseen test",
  "url": "/competitions/prostate-cancer-grade-assessment/discussion/145219",
  "author_name": "Y.Nakama",
  "post_date": "2020-04-22T10:39:09.270000",
  "votes": 44,
  "comment_count": 14,
  "views": 0,
  "content": "<p>I published notebook how to submit for unseen test set <a href=\"https://www.kaggle.com/yasufuminakama/panda-submit-test\">here</a></p>\n\n<p>I used \n<code>\nif os.path.exists('../input/prostate-cancer-grade-assessment/test_images'):\n  # inference\nelse:\n  # submit sample_submission.csv\n</code></p>\n\n<p>Hope this helps, happy kaggling :)</p>",
  "messages": [
    {
      "id": 816385,
      "postDate": "2020-04-22T10:39:09.270Z",
      "content": "<p>I published notebook how to submit for unseen test set <a href=\"https://www.kaggle.com/yasufuminakama/panda-submit-test\">here</a></p>\n\n<p>I used \n<code>\nif os.path.exists('../input/prostate-cancer-grade-assessment/test_images'):\n  # inference\nelse:\n  # submit sample_submission.csv\n</code></p>\n\n<p>Hope this helps, happy kaggling :)</p>",
      "rawMarkdown": "I published notebook how to submit for unseen test set [here](https://www.kaggle.com/yasufuminakama/panda-submit-test)\n\nI used \n```\nif os.path.exists('../input/prostate-cancer-grade-assessment/test_images'):\n  # inference\nelse:\n  # submit sample_submission.csv\n```\n\nHope this helps, happy kaggling :)",
      "votes": 44
    },
    {
      "id": 827674,
      "postDate": "2020-04-30T13:03:05.580Z",
      "content": "<p>There should be a fictive test folder with 2-3 images, IMHO. The current system adds useless constraints to the kagglers for trying out their pipelines...</p>",
      "rawMarkdown": "There should be a fictive test folder with 2-3 images, IMHO. The current system adds useless constraints to the kagglers for trying out their pipelines...",
      "votes": 4
    },
    {
      "id": 818923,
      "postDate": "2020-04-24T08:00:58.500Z",
      "content": "<p>Hello, <a href=\"/yasufuminakama\">@yasufuminakama</a>! Thanks for sharing. For me <code>os.path.exists('../input/prostate-cancer-grade-assessment/test_images')</code> returns <code>False</code> after committing also. I am not able to run inference. Do you know what could be the problem? The below code does not output any test predictions.</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1351163%2F301f2176f7e34574fedb20b9d0ee8b9a%2FScreenshot%202020-04-24%20at%201.30.02%20PM.png?generation=1587715227979907&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Hello, @yasufuminakama! Thanks for sharing. For me <code>os.path.exists('../input/prostate-cancer-grade-assessment/test_images')</code> returns <code>False</code> after committing also. I am not able to run inference. Do you know what could be the problem? The below code does not output any test predictions.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1351163%2F301f2176f7e34574fedb20b9d0ee8b9a%2FScreenshot%202020-04-24%20at%201.30.02%20PM.png?generation=1587715227979907&amp;alt=media)",
      "votes": 2,
      "replies": [
        {
          "id": 818941,
          "postDate": "2020-04-24T08:23:05.643Z",
          "content": "<p><code>os.path.exists('../input/prostate-cancer-grade-assessment/test_images')</code> is <code>False</code> while <code>committing</code>, it becomes <code>True</code> while <code>submitting</code>! (But we need to output submission.csv)\nSo the process is like this.\n<code>\ndef submit(sample_submission):\n    # For private, insert predictions for submission file\n    if os.path.exists('../input/prostate-cancer-grade-assessment/test_images'):\n        test_dataset = TestDataset(sample_submission, transform=get_transforms(data='valid'))\n        test_loader = DataLoader(test_dataset, batch_size=CFG.batch_size, shuffle=False)\n        preds = inference(model, test_loader, device)\n        sample_submission['isup_grade'] = preds\n    # For public, it returns raw sample_submission without predictions\n    return sample_submission\n</code>\nHope this helps :)</p>",
          "rawMarkdown": "`os.path.exists('../input/prostate-cancer-grade-assessment/test_images')` is `False` while `committing`, it becomes `True` while `submitting`! (But we need to output submission.csv)\nSo the process is like this.\n```\ndef submit(sample_submission):\n    # For private, insert predictions for submission file\n    if os.path.exists('../input/prostate-cancer-grade-assessment/test_images'):\n        test_dataset = TestDataset(sample_submission, transform=get_transforms(data='valid'))\n        test_loader = DataLoader(test_dataset, batch_size=CFG.batch_size, shuffle=False)\n        preds = inference(model, test_loader, device)\n        sample_submission['isup_grade'] = preds\n    # For public, it returns raw sample_submission without predictions\n    return sample_submission\n```\nHope this helps :)",
          "votes": 7
        },
        {
          "id": 831604,
          "postDate": "2020-05-03T13:29:54.080Z",
          "content": "<p>Hey. the same is happening with me. On top of this while making a submission it says in the status log, \"Submission CSV not found\".</p>",
          "rawMarkdown": "Hey. the same is happening with me. On top of this while making a submission it says in the status log, \"Submission CSV not found\".\n"
        },
        {
          "id": 832178,
          "postDate": "2020-05-03T23:39:49.470Z",
          "content": "<p>Why doesn't this work for me???</p>\n\n<p><a href=\"https://www.kaggle.com/yeayates21/panda-show-test-dir-exists-on-commit?scriptVersionId=33243239\">https://www.kaggle.com/yeayates21/panda-show-test-dir-exists-on-commit?scriptVersionId=33243239</a></p>\n\n<p>:-(</p>",
          "rawMarkdown": "Why doesn't this work for me???\n\nhttps://www.kaggle.com/yeayates21/panda-show-test-dir-exists-on-commit?scriptVersionId=33243239\n\n:-("
        },
        {
          "id": 832186,
          "postDate": "2020-05-03T23:52:34.230Z",
          "content": "<p><a href=\"/ibtesama\">@ibtesama</a> I think your inference function failed before generating submission.csv...\n<a href=\"/yeayates21\">@yeayates21</a> <code>os.path.exists('../input/prostate-cancer-grade-assessment/test_images')</code> is False while committing, it becomes True while submitting</p>",
          "rawMarkdown": "@ibtesama I think your inference function failed before generating submission.csv...\n@yeayates21 `os.path.exists('../input/prostate-cancer-grade-assessment/test_images')` is False while committing, it becomes True while submitting"
        },
        {
          "id": 832246,
          "postDate": "2020-05-04T02:08:30.480Z",
          "content": "<p>omg .. lol .. wow..thank you!  :-P</p>",
          "rawMarkdown": "omg .. lol .. wow..thank you!  :-P"
        },
        {
          "id": 834504,
          "postDate": "2020-05-05T15:22:45.093Z",
          "content": "<p><a href=\"/yasufuminakama\">@yasufuminakama</a> I don't think there is a problem with the inference code since I have checked it with the training data. Maybe inference overflows my RAM.</p>",
          "rawMarkdown": "@yasufuminakama I don't think there is a problem with the inference code since I have checked it with the training data. Maybe inference overflows my RAM.",
          "votes": 1
        }
      ]
    },
    {
      "id": 828756,
      "postDate": "2020-05-01T09:12:34.223Z",
      "content": "<p><a href=\"https://www.kaggle.com/zhangeng/kernel281ff24165\">This is my notebook</a>Who can help me look at my problems，Thanks first ！</p>",
      "rawMarkdown": "[This is my notebook](https://www.kaggle.com/zhangeng/kernel281ff24165)Who can help me look at my problems，Thanks first ！",
      "votes": -1,
      "replies": [
        {
          "id": 832176,
          "postDate": "2020-05-03T23:36:50.673Z",
          "content": "<p>When I click \"This is my notebook\" it sends me to 404 page</p>",
          "rawMarkdown": "When I click \"This is my notebook\" it sends me to 404 page"
        },
        {
          "id": 835297,
          "postDate": "2020-05-06T07:08:14.593Z",
          "content": "<p>I have solved it, so the notebook has been deleted😅 </p>",
          "rawMarkdown": "I have solved it, so the notebook has been deleted😅 "
        }
      ]
    },
    {
      "id": 821923,
      "postDate": "2020-04-26T14:07:57.113Z",
      "content": "<p>Can you please tell if data_provider exists for the test set? or its just the images</p>",
      "rawMarkdown": "Can you please tell if data_provider exists for the test set? or its just the images",
      "replies": [
        {
          "id": 822019,
          "postDate": "2020-04-26T15:26:59.077Z",
          "content": "<p>We have data_provider info in [train/test].csv (written in <a href=\"https://www.kaggle.com/c/prostate-cancer-grade-assessment/data\">https://www.kaggle.com/c/prostate-cancer-grade-assessment/data</a>)</p>",
          "rawMarkdown": "We have data_provider info in [train/test].csv (written in https://www.kaggle.com/c/prostate-cancer-grade-assessment/data)"
        }
      ]
    },
    {
      "id": 820563,
      "postDate": "2020-04-25T14:37:18.547Z",
      "content": "<p>Thanks for sharing.</p>",
      "rawMarkdown": "Thanks for sharing.",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 827674,
      "author_name": "Benjamin Dubreu",
      "author_url": "",
      "post_date": "2020-04-30T13:03:05.580000",
      "content": "<p>There should be a fictive test folder with 2-3 images, IMHO. The current system adds useless constraints to the kagglers for trying out their pipelines...</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 818923,
      "author_name": "Tarun Paparaju",
      "author_url": "",
      "post_date": "2020-04-24T08:00:58.500000",
      "content": "<p>Hello, <a href=\"/yasufuminakama\">@yasufuminakama</a>! Thanks for sharing. For me <code>os.path.exists('../input/prostate-cancer-grade-assessment/test_images')</code> returns <code>False</code> after committing also. I am not able to run inference. Do you know what could be the problem? The below code does not output any test predictions.</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1351163%2F301f2176f7e34574fedb20b9d0ee8b9a%2FScreenshot%202020-04-24%20at%201.30.02%20PM.png?generation=1587715227979907&amp;alt=media\" alt=\"\"></p>",
      "votes": 2,
      "replies": [
        {
          "id": 818941,
          "author_name": "Y.Nakama",
          "author_url": "",
          "post_date": "2020-04-24T08:23:05.643000",
          "content": "<p><code>os.path.exists('../input/prostate-cancer-grade-assessment/test_images')</code> is <code>False</code> while <code>committing</code>, it becomes <code>True</code> while <code>submitting</code>! (But we need to output submission.csv)\nSo the process is like this.\n<code>\ndef submit(sample_submission):\n    # For private, insert predictions for submission file\n    if os.path.exists('../input/prostate-cancer-grade-assessment/test_images'):\n        test_dataset = TestDataset(sample_submission, transform=get_transforms(data='valid'))\n        test_loader = DataLoader(test_dataset, batch_size=CFG.batch_size, shuffle=False)\n        preds = inference(model, test_loader, device)\n        sample_submission['isup_grade'] = preds\n    # For public, it returns raw sample_submission without predictions\n    return sample_submission\n</code>\nHope this helps :)</p>",
          "votes": 7,
          "replies": []
        },
        {
          "id": 831604,
          "author_name": "Ibtesam Ahmed",
          "author_url": "",
          "post_date": "2020-05-03T13:29:54.080000",
          "content": "<p>Hey. the same is happening with me. On top of this while making a submission it says in the status log, \"Submission CSV not found\".</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 832178,
          "author_name": "Matt Yates",
          "author_url": "",
          "post_date": "2020-05-03T23:39:49.470000",
          "content": "<p>Why doesn't this work for me???</p>\n\n<p><a href=\"https://www.kaggle.com/yeayates21/panda-show-test-dir-exists-on-commit?scriptVersionId=33243239\">https://www.kaggle.com/yeayates21/panda-show-test-dir-exists-on-commit?scriptVersionId=33243239</a></p>\n\n<p>:-(</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 832186,
          "author_name": "Y.Nakama",
          "author_url": "",
          "post_date": "2020-05-03T23:52:34.230000",
          "content": "<p><a href=\"/ibtesama\">@ibtesama</a> I think your inference function failed before generating submission.csv...\n<a href=\"/yeayates21\">@yeayates21</a> <code>os.path.exists('../input/prostate-cancer-grade-assessment/test_images')</code> is False while committing, it becomes True while submitting</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 832246,
          "author_name": "Matt Yates",
          "author_url": "",
          "post_date": "2020-05-04T02:08:30.480000",
          "content": "<p>omg .. lol .. wow..thank you!  :-P</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 834504,
          "author_name": "Ibtesam Ahmed",
          "author_url": "",
          "post_date": "2020-05-05T15:22:45.093000",
          "content": "<p><a href=\"/yasufuminakama\">@yasufuminakama</a> I don't think there is a problem with the inference code since I have checked it with the training data. Maybe inference overflows my RAM.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 828756,
      "author_name": "zhangeng",
      "author_url": "",
      "post_date": "2020-05-01T09:12:34.223000",
      "content": "<p><a href=\"https://www.kaggle.com/zhangeng/kernel281ff24165\">This is my notebook</a>Who can help me look at my problems，Thanks first ！</p>",
      "votes": -1,
      "replies": [
        {
          "id": 832176,
          "author_name": "Matt Yates",
          "author_url": "",
          "post_date": "2020-05-03T23:36:50.673000",
          "content": "<p>When I click \"This is my notebook\" it sends me to 404 page</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 835297,
          "author_name": "zhangeng",
          "author_url": "",
          "post_date": "2020-05-06T07:08:14.593000",
          "content": "<p>I have solved it, so the notebook has been deleted😅 </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 821923,
      "author_name": "Mr_KnowNothing",
      "author_url": "",
      "post_date": "2020-04-26T14:07:57.113000",
      "content": "<p>Can you please tell if data_provider exists for the test set? or its just the images</p>",
      "votes": 0,
      "replies": [
        {
          "id": 822019,
          "author_name": "Y.Nakama",
          "author_url": "",
          "post_date": "2020-04-26T15:26:59.077000",
          "content": "<p>We have data_provider info in [train/test].csv (written in <a href=\"https://www.kaggle.com/c/prostate-cancer-grade-assessment/data\">https://www.kaggle.com/c/prostate-cancer-grade-assessment/data</a>)</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 820563,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-04-25T14:37:18.547000",
      "content": "<p>Thanks for sharing.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "816385": "I published notebook how to submit for unseen test set [here](https://www.kaggle.com/yasufuminakama/panda-submit-test)\n\nI used \n```\nif os.path.exists('../input/prostate-cancer-grade-assessment/test_images'):\n  # inference\nelse:\n  # submit sample_submission.csv\n```\n\nHope this helps, happy kaggling :)",
    "827674": "There should be a fictive test folder with 2-3 images, IMHO. The current system adds useless constraints to the kagglers for trying out their pipelines...",
    "818923": "Hello, @yasufuminakama! Thanks for sharing. For me <code>os.path.exists('../input/prostate-cancer-grade-assessment/test_images')</code> returns <code>False</code> after committing also. I am not able to run inference. Do you know what could be the problem? The below code does not output any test predictions.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1351163%2F301f2176f7e34574fedb20b9d0ee8b9a%2FScreenshot%202020-04-24%20at%201.30.02%20PM.png?generation=1587715227979907&amp;alt=media)",
    "828756": "[This is my notebook](https://www.kaggle.com/zhangeng/kernel281ff24165)Who can help me look at my problems，Thanks first ！",
    "821923": "Can you please tell if data_provider exists for the test set? or its just the images",
    "820563": "Thanks for sharing."
  }
}