{
  "id": 181013,
  "title": "Using externally trained models ?",
  "url": "/competitions/osic-pulmonary-fibrosis-progression/discussion/181013",
  "author_name": "",
  "post_date": "2020-09-07T09:52:52.948849400Z",
  "votes": 1,
  "comment_count": 7,
  "views": 0,
  "content": "<p>Hello,<br>\nI am trying to use models that I train on my local GPU with the provided train set. I understand that it is allowed by the competition rules. </p>\n<p>I create a Kaggle dataset with my TF model weights, I attach the dataset to my notebook where I load the weights and put the test dataset through the models, average the results and create my submission file.<br>\nThe notebook ran ok, the results are consistent with what I get on my local computer.</p>\n<p>Then I submit the notebook version and it fails with the very helpful message 'Submission CSV not found', Error, No additional details provided…</p>\n<p>After testing memory problems, GPU problems, and putting dummy submission files evverywhere in my code to locate the problem, I found out that while running the private test dataset, the notebook couldn't find the models and load them…</p>\n<p>I expect that to run the private dataset it detachs the /kaggle/input directory to replace it with something else (?) and than maybe loose the dataset attachment…</p>\n<p>Is there something special to do to use an external dataset ?<br>\nDoes the dataset have to be public ?</p>\n<p>I would be grateful for any help.<br>\nThanks<br>\nPhilippe</p>",
  "messages": [
    {
      "id": "1001384",
      "postDate": "09/07/2020 09:52:52",
      "content": "<p>Hello,<br>\nI am trying to use models that I train on my local GPU with the provided train set. I understand that it is allowed by the competition rules. </p>\n<p>I create a Kaggle dataset with my TF model weights, I attach the dataset to my notebook where I load the weights and put the test dataset through the models, average the results and create my submission file.<br>\nThe notebook ran ok, the results are consistent with what I get on my local computer.</p>\n<p>Then I submit the notebook version and it fails with the very helpful message 'Submission CSV not found', Error, No additional details provided…</p>\n<p>After testing memory problems, GPU problems, and putting dummy submission files evverywhere in my code to locate the problem, I found out that while running the private test dataset, the notebook couldn't find the models and load them…</p>\n<p>I expect that to run the private dataset it detachs the /kaggle/input directory to replace it with something else (?) and than maybe loose the dataset attachment…</p>\n<p>Is there something special to do to use an external dataset ?<br>\nDoes the dataset have to be public ?</p>\n<p>I would be grateful for any help.<br>\nThanks<br>\nPhilippe</p>",
      "rawMarkdown": "Hello,\nI am trying to use models that I train on my local GPU with the provided train set. I understand that it is allowed by the competition rules. \n\nI create a Kaggle dataset with my TF model weights, I attach the dataset to my notebook where I load the weights and put the test dataset through the models, average the results and create my submission file.\nThe notebook ran ok, the results are consistent with what I get on my local computer.\n\nThen I submit the notebook version and it fails with the very helpful message 'Submission CSV not found', Error, No additional details provided...\n\nAfter testing memory problems, GPU problems, and putting dummy submission files evverywhere in my code to locate the problem, I found out that while running the private test dataset, the notebook couldn't find the models and load them...\n\nI expect that to run the private dataset it detachs the /kaggle/input directory to replace it with something else (?) and than maybe loose the dataset attachment...\n\nIs there something special to do to use an external dataset ?\nDoes the dataset have to be public ?\n\nI would be grateful for any help.\nThanks\nPhilippe",
      "votes": null
    },
    {
      "id": "1001574",
      "postDate": "09/07/2020 12:19:32",
      "content": "<p>No, there's nothing special you have to do in order to use an external dataset. Just make sure you have both the OSIC dataset and your model dataset both attached to your notebook and you should be fine. </p>\n<p>The OSIC dataset can be found in the <code>../input/osic-pulmonary-fibrosis-progression</code> directory and your dataset in <code>../input/MODEL-DATASET_NAME</code>. (You can copy the absolute paths in the notebook UI too.)</p>",
      "rawMarkdown": "No, there's nothing special you have to do in order to use an external dataset. Just make sure you have both the OSIC dataset and your model dataset both attached to your notebook and you should be fine. \n\nThe OSIC dataset can be found in the `../input/osic-pulmonary-fibrosis-progression` directory and your dataset in `../input/MODEL-DATASET_NAME`. (You can copy the absolute paths in the notebook UI too.)",
      "votes": null
    },
    {
      "id": "1002421",
      "postDate": "09/08/2020 05:42:13",
      "content": "<p>Thanks for answering, it helps removing failure hypotheses.</p>",
      "rawMarkdown": "Thanks for answering, it helps removing failure hypotheses.",
      "votes": null
    },
    {
      "id": "1004257",
      "postDate": "09/09/2020 15:04:34",
      "content": "<p>I found out that zipping the files for uploading the entire (a bit large) dataset causes problem. Without zipping it, it works through the private test set…</p>",
      "rawMarkdown": "I found out that zipping the files for uploading the entire (a bit large) dataset causes problem. Without zipping it, it works through the private test set...",
      "votes": null
    },
    {
      "id": "1004587",
      "postDate": "09/09/2020 20:17:47",
      "content": "<p>You mean if you have a folder with train imgs upload the whole folder without zipping it?</p>",
      "rawMarkdown": "You mean if you have a folder with train imgs upload the whole folder without zipping it?",
      "votes": null
    },
    {
      "id": "1004607",
      "postDate": "09/09/2020 21:02:33",
      "content": "<p>I think the zipped root folder name might have an extra folder level than without zipping</p>",
      "rawMarkdown": "I think the zipped root folder name might have an extra folder level than without zipping",
      "votes": null
    },
    {
      "id": "1005013",
      "postDate": "09/10/2020 07:57:03",
      "content": "<p>It's not train imgs ; I have a folder with trained models, they are trained locally on the images from the train set. I have 5 trained models, one for each fold. Then I have second stage models that are used to compute confidence trained on the results for each first stage fold… I have 5 first stage folds and 3 second stage folds then a total of 20 models for around 270Mb . I originally zipped all the models before uploading them to the dataset.</p>\n<p>When running the notebook before submitting, everything was fine, I was able to use the trained models but when submitting and running on the private test set, the models were not found or I don't know what happened.</p>\n<p>Now when I upload the models without zipping it first, it's running ok on the private test set…</p>",
      "rawMarkdown": "It's not train imgs ; I have a folder with trained models, they are trained locally on the images from the train set. I have 5 trained models, one for each fold. Then I have second stage models that are used to compute confidence trained on the results for each first stage fold... I have 5 first stage folds and 3 second stage folds then a total of 20 models for around 270Mb . I originally zipped all the models before uploading them to the dataset.\n\nWhen running the notebook before submitting, everything was fine, I was able to use the trained models but when submitting and running on the private test set, the models were not found or I don't know what happened.\n\nNow when I upload the models without zipping it first, it's running ok on the private test set...",
      "votes": null
    },
    {
      "id": "1005015",
      "postDate": "09/10/2020 07:58:44",
      "content": "<p>in that the case it's shouldn't have run ok on the saved notebook before submitting, should it ?</p>",
      "rawMarkdown": "in that the case it's shouldn't have run ok on the saved notebook before submitting, should it ?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1001574,
      "author_name": "christoffer",
      "author_url": "",
      "post_date": "09/07/2020 12:19:32",
      "content": "<p>No, there's nothing special you have to do in order to use an external dataset. Just make sure you have both the OSIC dataset and your model dataset both attached to your notebook and you should be fine. </p>\n<p>The OSIC dataset can be found in the <code>../input/osic-pulmonary-fibrosis-progression</code> directory and your dataset in <code>../input/MODEL-DATASET_NAME</code>. (You can copy the absolute paths in the notebook UI too.)</p>",
      "votes": null,
      "replies": [
        {
          "id": 1002421,
          "author_name": "filipix",
          "author_url": "",
          "post_date": "09/08/2020 05:42:13",
          "content": "<p>Thanks for answering, it helps removing failure hypotheses.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1004257,
          "author_name": "filipix",
          "author_url": "",
          "post_date": "09/09/2020 15:04:34",
          "content": "<p>I found out that zipping the files for uploading the entire (a bit large) dataset causes problem. Without zipping it, it works through the private test set…</p>",
          "votes": null,
          "replies": [
            {
              "id": 1004607,
              "author_name": "richardepstein",
              "author_url": "",
              "post_date": "09/09/2020 21:02:33",
              "content": "<p>I think the zipped root folder name might have an extra folder level than without zipping</p>",
              "votes": null,
              "replies": []
            },
            {
              "id": 1005015,
              "author_name": "filipix",
              "author_url": "",
              "post_date": "09/10/2020 07:58:44",
              "content": "<p>in that the case it's shouldn't have run ok on the saved notebook before submitting, should it ?</p>",
              "votes": null,
              "replies": []
            }
          ]
        },
        {
          "id": 1004587,
          "author_name": "enric1296",
          "author_url": "",
          "post_date": "09/09/2020 20:17:47",
          "content": "<p>You mean if you have a folder with train imgs upload the whole folder without zipping it?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1005013,
          "author_name": "filipix",
          "author_url": "",
          "post_date": "09/10/2020 07:57:03",
          "content": "<p>It's not train imgs ; I have a folder with trained models, they are trained locally on the images from the train set. I have 5 trained models, one for each fold. Then I have second stage models that are used to compute confidence trained on the results for each first stage fold… I have 5 first stage folds and 3 second stage folds then a total of 20 models for around 270Mb . I originally zipped all the models before uploading them to the dataset.</p>\n<p>When running the notebook before submitting, everything was fine, I was able to use the trained models but when submitting and running on the private test set, the models were not found or I don't know what happened.</p>\n<p>Now when I upload the models without zipping it first, it's running ok on the private test set…</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1001384": "Hello,\nI am trying to use models that I train on my local GPU with the provided train set. I understand that it is allowed by the competition rules. \n\nI create a Kaggle dataset with my TF model weights, I attach the dataset to my notebook where I load the weights and put the test dataset through the models, average the results and create my submission file.\nThe notebook ran ok, the results are consistent with what I get on my local computer.\n\nThen I submit the notebook version and it fails with the very helpful message 'Submission CSV not found', Error, No additional details provided...\n\nAfter testing memory problems, GPU problems, and putting dummy submission files evverywhere in my code to locate the problem, I found out that while running the private test dataset, the notebook couldn't find the models and load them...\n\nI expect that to run the private dataset it detachs the /kaggle/input directory to replace it with something else (?) and than maybe loose the dataset attachment...\n\nIs there something special to do to use an external dataset ?\nDoes the dataset have to be public ?\n\nI would be grateful for any help.\nThanks\nPhilippe",
    "1001574": "No, there's nothing special you have to do in order to use an external dataset. Just make sure you have both the OSIC dataset and your model dataset both attached to your notebook and you should be fine. \n\nThe OSIC dataset can be found in the `../input/osic-pulmonary-fibrosis-progression` directory and your dataset in `../input/MODEL-DATASET_NAME`. (You can copy the absolute paths in the notebook UI too.)",
    "1002421": "Thanks for answering, it helps removing failure hypotheses.",
    "1004257": "I found out that zipping the files for uploading the entire (a bit large) dataset causes problem. Without zipping it, it works through the private test set...",
    "1004587": "You mean if you have a folder with train imgs upload the whole folder without zipping it?",
    "1004607": "I think the zipped root folder name might have an extra folder level than without zipping",
    "1005013": "It's not train imgs ; I have a folder with trained models, they are trained locally on the images from the train set. I have 5 trained models, one for each fold. Then I have second stage models that are used to compute confidence trained on the results for each first stage fold... I have 5 first stage folds and 3 second stage folds then a total of 20 models for around 270Mb . I originally zipped all the models before uploading them to the dataset.\n\nWhen running the notebook before submitting, everything was fine, I was able to use the trained models but when submitting and running on the private test set, the models were not found or I don't know what happened.\n\nNow when I upload the models without zipping it first, it's running ok on the private test set...",
    "1005015": "in that the case it's shouldn't have run ok on the saved notebook before submitting, should it ?"
  },
  "source": "meta"
}