{
  "id": 321426,
  "title": "Help with saving files in the working directory and commit time",
  "url": "/competitions/sorghum-id-fgvc-9/discussion/321426",
  "author_name": "",
  "post_date": "2022-04-26T19:07:28.447975Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hi, this is my first Kaggle competition and I'm having troubles saving files and recovering them later in order to save time.<br>\nIn this specific case, I do some pre processing on the images and then I want to save the new images on the kaggle/working directory. After doing it with the proper Python command ( ax.imwrite() ), I commit the kernel with \"Save and run all\" and set the advanced options to \"always save output\". But when I log out from Kaggle and then log in again… It all has disappeared and I have to pre-process everything again, with the code taking close to 1h to run and even more to commit!</p>\n<p>It's impossible to work under these conditions… Any advice on how to solve this issue?</p>",
  "messages": [
    {
      "id": "1768949",
      "postDate": "04/26/2022 19:07:28",
      "content": "<p>Hi, this is my first Kaggle competition and I'm having troubles saving files and recovering them later in order to save time.<br>\nIn this specific case, I do some pre processing on the images and then I want to save the new images on the kaggle/working directory. After doing it with the proper Python command ( ax.imwrite() ), I commit the kernel with \"Save and run all\" and set the advanced options to \"always save output\". But when I log out from Kaggle and then log in again… It all has disappeared and I have to pre-process everything again, with the code taking close to 1h to run and even more to commit!</p>\n<p>It's impossible to work under these conditions… Any advice on how to solve this issue?</p>",
      "rawMarkdown": "Hi, this is my first Kaggle competition and I'm having troubles saving files and recovering them later in order to save time.\nIn this specific case, I do some pre processing on the images and then I want to save the new images on the kaggle/working directory. After doing it with the proper Python command ( ax.imwrite() ), I commit the kernel with \"Save and run all\" and set the advanced options to \"always save output\". But when I log out from Kaggle and then log in again... It all has disappeared and I have to pre-process everything again, with the code taking close to 1h to run and even more to commit!\n\nIt's impossible to work under these conditions... Any advice on how to solve this issue?",
      "votes": null
    },
    {
      "id": "1768961",
      "postDate": "04/26/2022 19:49:18",
      "content": "<p><a href=\"https://www.kaggle.com/nevrocerasani\" target=\"_blank\">@nevrocerasani</a> When you do \"Save &amp; Run All\" it re-runs your notebook top to bottom in a background copy and creates an immutable version of the notebook that ran, and the files that were written to /kaggle/working.</p>\n<p>If you want to recover those files, you can add your saved version notebook output as a dataset with \"Add Data\" in the editor. Then the files will be read-only added as a dataset in /kaggle/input/$notebook_name/.</p>\n<p>I am currently working on a feature to automatically save/restore files in /kaggle/working in the editor to make use cases like yours easier.</p>",
      "rawMarkdown": "nevrocerasani When you do \"Save & Run All\" it re-runs your notebook top to bottom in a background copy and creates an immutable version of the notebook that ran, and the files that were written to /kaggle/working.\n\nIf you want to recover those files, you can add your saved version notebook output as a dataset with \"Add Data\" in the editor. Then the files will be read-only added as a dataset in /kaggle/input/$notebook_name/.\n\nI am currently working on a feature to automatically save/restore files in /kaggle/working in the editor to make use cases like yours easier.",
      "votes": null
    },
    {
      "id": "1768965",
      "postDate": "04/26/2022 19:56:46",
      "content": "<p><a href=\"https://www.kaggle.com/herbison\" target=\"_blank\">@herbison</a> Thank you for your clear and prompt response!</p>",
      "rawMarkdown": "herbison Thank you for your clear and prompt response!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1768961,
      "author_name": "herbison",
      "author_url": "",
      "post_date": "04/26/2022 19:49:18",
      "content": "<p><a href=\"https://www.kaggle.com/nevrocerasani\" target=\"_blank\">@nevrocerasani</a> When you do \"Save &amp; Run All\" it re-runs your notebook top to bottom in a background copy and creates an immutable version of the notebook that ran, and the files that were written to /kaggle/working.</p>\n<p>If you want to recover those files, you can add your saved version notebook output as a dataset with \"Add Data\" in the editor. Then the files will be read-only added as a dataset in /kaggle/input/$notebook_name/.</p>\n<p>I am currently working on a feature to automatically save/restore files in /kaggle/working in the editor to make use cases like yours easier.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1768965,
          "author_name": "nevrocerasani",
          "author_url": "",
          "post_date": "04/26/2022 19:56:46",
          "content": "<p><a href=\"https://www.kaggle.com/herbison\" target=\"_blank\">@herbison</a> Thank you for your clear and prompt response!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1768949": "Hi, this is my first Kaggle competition and I'm having troubles saving files and recovering them later in order to save time.\nIn this specific case, I do some pre processing on the images and then I want to save the new images on the kaggle/working directory. After doing it with the proper Python command ( ax.imwrite() ), I commit the kernel with \"Save and run all\" and set the advanced options to \"always save output\". But when I log out from Kaggle and then log in again... It all has disappeared and I have to pre-process everything again, with the code taking close to 1h to run and even more to commit!\n\nIt's impossible to work under these conditions... Any advice on how to solve this issue?",
    "1768961": "nevrocerasani When you do \"Save & Run All\" it re-runs your notebook top to bottom in a background copy and creates an immutable version of the notebook that ran, and the files that were written to /kaggle/working.\n\nIf you want to recover those files, you can add your saved version notebook output as a dataset with \"Add Data\" in the editor. Then the files will be read-only added as a dataset in /kaggle/input/$notebook_name/.\n\nI am currently working on a feature to automatically save/restore files in /kaggle/working in the editor to make use cases like yours easier.",
    "1768965": "herbison Thank you for your clear and prompt response!"
  },
  "source": "meta"
}