{
  "id": 296312,
  "title": "Trouble Saving Persistent Data",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/296312",
  "author_name": "",
  "post_date": "2021-12-21T02:52:02.079284700Z",
  "votes": null,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I am trying to upload a model from my home PC using a notebook that copies the model weights from a git repo. When I run the script, it works and the data is where I expect it.</p>\n<p>%cd /kaggle/working<br>\n%rm -r CrownOfThorns<br>\n%mkdir CrownOfThorns<br>\n!git clone https://@github.com/.git<br>\n%ls /kaggle/working*</p>\n<p>A full listing of /kaggle/working works as expected, and the files are where they should be: </p>\n<p>import os<br>\nfor dirname, _, filenames in os.walk('/kaggle/working'):<br>\n    for filename in filenames:<br>\n        print(os.path.join(dirname, filename))</p>\n<p>Then I try to save the data with persistence, by hitting \"Save Version\" in the upper right corner. The radio button \"Always save output\"  (Advanced Settings) is checked. Save is hit twice from advanced settings and the notebook reports a successful run.</p>\n<p>Now when I go into a new notebook to infer from the model - the notebook cannot find or list the \"saved\" files (using the same for loop above). I checked this thread: <a href=\"https://www.kaggle.com/szamil/where-is-my-output-file\" target=\"_blank\">https://www.kaggle.com/szamil/where-is-my-output-file</a> but it seems obsolete as the Kaggle interface appears to have changed.</p>\n<p>Notebook boilerplate text says: \"\"\"You can write up to 20GB to the current directory <br>\n(/kaggle/working/) that gets PRESERVED as output when you create a version using \"Save &amp; Run All\" \"\"\".<br>\nBut, I cannot find my files in the \"Infer\" notebook, in /kaggle/working.<br>\nPlease where and how do I save the files so they can be accessed later?<br>\nWhat am I doing wrong? </p>",
  "messages": [
    {
      "id": "1624552",
      "postDate": "12/21/2021 02:52:02",
      "content": "<p>I am trying to upload a model from my home PC using a notebook that copies the model weights from a git repo. When I run the script, it works and the data is where I expect it.</p>\n<p>%cd /kaggle/working<br>\n%rm -r CrownOfThorns<br>\n%mkdir CrownOfThorns<br>\n!git clone https://@github.com/.git<br>\n%ls /kaggle/working*</p>\n<p>A full listing of /kaggle/working works as expected, and the files are where they should be: </p>\n<p>import os<br>\nfor dirname, _, filenames in os.walk('/kaggle/working'):<br>\n    for filename in filenames:<br>\n        print(os.path.join(dirname, filename))</p>\n<p>Then I try to save the data with persistence, by hitting \"Save Version\" in the upper right corner. The radio button \"Always save output\"  (Advanced Settings) is checked. Save is hit twice from advanced settings and the notebook reports a successful run.</p>\n<p>Now when I go into a new notebook to infer from the model - the notebook cannot find or list the \"saved\" files (using the same for loop above). I checked this thread: <a href=\"https://www.kaggle.com/szamil/where-is-my-output-file\" target=\"_blank\">https://www.kaggle.com/szamil/where-is-my-output-file</a> but it seems obsolete as the Kaggle interface appears to have changed.</p>\n<p>Notebook boilerplate text says: \"\"\"You can write up to 20GB to the current directory <br>\n(/kaggle/working/) that gets PRESERVED as output when you create a version using \"Save &amp; Run All\" \"\"\".<br>\nBut, I cannot find my files in the \"Infer\" notebook, in /kaggle/working.<br>\nPlease where and how do I save the files so they can be accessed later?<br>\nWhat am I doing wrong? </p>",
      "rawMarkdown": "I am trying to upload a model from my home PC using a notebook that copies the model weights from a git repo. When I run the script, it works and the data is where I expect it.\n\n%cd /kaggle/working\n%rm -r CrownOfThorns\n%mkdir CrownOfThorns\n!git clone https://<mykey>@github.com/<my repo>.git\n%ls /kaggle/working*\n\nA full listing of /kaggle/working works as expected, and the files are where they should be: \n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/working'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n        \nThen I try to save the data with persistence, by hitting \"Save Version\" in the upper right corner. The radio button \"Always save output\"  (Advanced Settings) is checked. Save is hit twice from advanced settings and the notebook reports a successful run.\n\nNow when I go into a new notebook to infer from the model - the notebook cannot find or list the \"saved\" files (using the same for loop above). I checked this thread: https://www.kaggle.com/szamil/where-is-my-output-file but it seems obsolete as the Kaggle interface appears to have changed.\n\nNotebook boilerplate text says: \"\"\"You can write up to 20GB to the current directory \n(/kaggle/working/) that gets PRESERVED as output when you create a version using \"Save & Run All\" \"\"\".\nBut, I cannot find my files in the \"Infer\" notebook, in /kaggle/working.\nPlease where and how do I save the files so they can be accessed later?\nWhat am I doing wrong?",
      "votes": null
    },
    {
      "id": "1624565",
      "postDate": "12/21/2021 03:16:35",
      "content": "<p>I may have found something. \"File-Add or Upload Data\" in the edit menu upper left - then look around at \"Notebook Output Files - Your Work\". Seems like this works.</p>",
      "rawMarkdown": "I may have found something. \"File-Add or Upload Data\" in the edit menu upper left - then look around at \"Notebook Output Files - Your Work\". Seems like this works.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1624565,
      "author_name": "vettejeep",
      "author_url": "",
      "post_date": "12/21/2021 03:16:35",
      "content": "<p>I may have found something. \"File-Add or Upload Data\" in the edit menu upper left - then look around at \"Notebook Output Files - Your Work\". Seems like this works.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1624552": "I am trying to upload a model from my home PC using a notebook that copies the model weights from a git repo. When I run the script, it works and the data is where I expect it.\n\n%cd /kaggle/working\n%rm -r CrownOfThorns\n%mkdir CrownOfThorns\n!git clone https://<mykey>@github.com/<my repo>.git\n%ls /kaggle/working*\n\nA full listing of /kaggle/working works as expected, and the files are where they should be: \n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/working'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n        \nThen I try to save the data with persistence, by hitting \"Save Version\" in the upper right corner. The radio button \"Always save output\"  (Advanced Settings) is checked. Save is hit twice from advanced settings and the notebook reports a successful run.\n\nNow when I go into a new notebook to infer from the model - the notebook cannot find or list the \"saved\" files (using the same for loop above). I checked this thread: https://www.kaggle.com/szamil/where-is-my-output-file but it seems obsolete as the Kaggle interface appears to have changed.\n\nNotebook boilerplate text says: \"\"\"You can write up to 20GB to the current directory \n(/kaggle/working/) that gets PRESERVED as output when you create a version using \"Save & Run All\" \"\"\".\nBut, I cannot find my files in the \"Infer\" notebook, in /kaggle/working.\nPlease where and how do I save the files so they can be accessed later?\nWhat am I doing wrong?",
    "1624565": "I may have found something. \"File-Add or Upload Data\" in the edit menu upper left - then look around at \"Notebook Output Files - Your Work\". Seems like this works."
  },
  "source": "meta"
}