{
  "id": 651748,
  "title": "Bug Regarding /kaggle/tmp Disk Space",
  "url": "/competitions/MABe-mouse-behavior-detection/discussion/651748",
  "author_name": "",
  "post_date": "2025-12-05T03:38:14.656356100Z",
  "votes": 3,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Dear Kaggle staff, <a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> </p>\n<p>In this competition, I am using the<code>/kaggle/tmp</code> directory as a temporary storage location for features. I would like to inquire about the specifications of this directory.</p>\n<p>It appears that the disk utilization space for <code>/kaggle/tmp</code> is not resetting even after creating and subsequently deleting files when running the notebook. Consequently, when I repeatedly create and delete files, the disk utilization space becomes constrained—leading to notebook errors—despite having sufficient actual storage capacity. This issue has occurred both in the notebook's edit mode and during commit runs.</p>\n<p>Could you please confirm if this behavior is intentional (by design)?</p>\n<pre><code> os\n time\n pathlib  Path\nTMP_DIR = Path()\nTMP_DIR.mkdir(exist_ok=)\n\nFILE_NAME = \n i  ():\n    ()\n    \n\n    :\n        \n        chunk =  * ( * )  \n         (FILE_NAME, )  f:\n             _  ():  \n                f.write(chunk)\n\n     Exception  e:\n        (e)\n\n    \n    os.remove(FILE_NAME)\n    \n    time.sleep()\n</code></pre>",
  "messages": [
    {
      "id": "3362630",
      "postDate": "12/05/2025 03:38:14",
      "content": "<p>Dear Kaggle staff, <a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> </p>\n<p>In this competition, I am using the<code>/kaggle/tmp</code> directory as a temporary storage location for features. I would like to inquire about the specifications of this directory.</p>\n<p>It appears that the disk utilization space for <code>/kaggle/tmp</code> is not resetting even after creating and subsequently deleting files when running the notebook. Consequently, when I repeatedly create and delete files, the disk utilization space becomes constrained—leading to notebook errors—despite having sufficient actual storage capacity. This issue has occurred both in the notebook's edit mode and during commit runs.</p>\n<p>Could you please confirm if this behavior is intentional (by design)?</p>\n<pre><code> os\n time\n pathlib  Path\nTMP_DIR = Path()\nTMP_DIR.mkdir(exist_ok=)\n\nFILE_NAME = \n i  ():\n    ()\n    \n\n    :\n        \n        chunk =  * ( * )  \n         (FILE_NAME, )  f:\n             _  ():  \n                f.write(chunk)\n\n     Exception  e:\n        (e)\n\n    \n    os.remove(FILE_NAME)\n    \n    time.sleep()\n</code></pre>",
      "rawMarkdown": "Dear Kaggle staff, @sohier \n\nIn this competition, I am using the` /kaggle/tmp` directory as a temporary storage location for features. I would like to inquire about the specifications of this directory.\n\nIt appears that the disk utilization space for `/kaggle/tmp` is not resetting even after creating and subsequently deleting files when running the notebook. Consequently, when I repeatedly create and delete files, the disk utilization space becomes constrained—leading to notebook errors—despite having sufficient actual storage capacity. This issue has occurred both in the notebook's edit mode and during commit runs.\n\nCould you please confirm if this behavior is intentional (by design)?\n\n```python\nimport os\nimport time\nfrom pathlib import Path\nTMP_DIR = Path('../tmp')\nTMP_DIR.mkdir(exist_ok=True)\n\nFILE_NAME = '../tmp/10gb_dummy_file.bin'\nfor i in range(20):\n    print(f\"trial {i}\")\n    # Create dummy 10 GB file(10 * 1024 * 1024 * 1024)\n        \n    try:\n        # 'wb' (write binary) \n        chunk = b\"\\0\" * (1024 * 1024)  # 1MB\n        with open(FILE_NAME, \"wb\") as f:\n            for _ in range(10240):  # 10GB = 10,240 MB\n                f.write(chunk)\n            \n    except Exception as e:\n        print(e)\n    \n    # remove\n    os.remove(FILE_NAME)\n    # timer\n    time.sleep(10)\n```",
      "votes": null
    },
    {
      "id": "3362979",
      "postDate": "12/05/2025 17:32:16",
      "content": "<p>Thanks for the report, I was able to replicate the issue using your script. I've filed an internal bug report with the relevant engineering team.</p>",
      "rawMarkdown": "Thanks for the report, I was able to replicate the issue using your script. I've filed an internal bug report with the relevant engineering team.",
      "votes": null
    },
    {
      "id": "3406357",
      "postDate": "02/15/2026 13:02:36",
      "content": "<p>Hello, this issue still persists. I also encountered this problem in the recent Vesuvius Challenge - Surface Detection.</p>",
      "rawMarkdown": "Hello, this issue still persists. I also encountered this problem in the recent Vesuvius Challenge - Surface Detection.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3362979,
      "author_name": "sohier",
      "author_url": "",
      "post_date": "12/05/2025 17:32:16",
      "content": "<p>Thanks for the report, I was able to replicate the issue using your script. I've filed an internal bug report with the relevant engineering team.</p>",
      "votes": null,
      "replies": [
        {
          "id": 3406357,
          "author_name": "cudacoding",
          "author_url": "",
          "post_date": "02/15/2026 13:02:36",
          "content": "<p>Hello, this issue still persists. I also encountered this problem in the recent Vesuvius Challenge - Surface Detection.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3362630": "Dear Kaggle staff, @sohier \n\nIn this competition, I am using the` /kaggle/tmp` directory as a temporary storage location for features. I would like to inquire about the specifications of this directory.\n\nIt appears that the disk utilization space for `/kaggle/tmp` is not resetting even after creating and subsequently deleting files when running the notebook. Consequently, when I repeatedly create and delete files, the disk utilization space becomes constrained—leading to notebook errors—despite having sufficient actual storage capacity. This issue has occurred both in the notebook's edit mode and during commit runs.\n\nCould you please confirm if this behavior is intentional (by design)?\n\n```python\nimport os\nimport time\nfrom pathlib import Path\nTMP_DIR = Path('../tmp')\nTMP_DIR.mkdir(exist_ok=True)\n\nFILE_NAME = '../tmp/10gb_dummy_file.bin'\nfor i in range(20):\n    print(f\"trial {i}\")\n    # Create dummy 10 GB file(10 * 1024 * 1024 * 1024)\n        \n    try:\n        # 'wb' (write binary) \n        chunk = b\"\\0\" * (1024 * 1024)  # 1MB\n        with open(FILE_NAME, \"wb\") as f:\n            for _ in range(10240):  # 10GB = 10,240 MB\n                f.write(chunk)\n            \n    except Exception as e:\n        print(e)\n    \n    # remove\n    os.remove(FILE_NAME)\n    # timer\n    time.sleep(10)\n```",
    "3362979": "Thanks for the report, I was able to replicate the issue using your script. I've filed an internal bug report with the relevant engineering team.",
    "3406357": "Hello, this issue still persists. I also encountered this problem in the recent Vesuvius Challenge - Surface Detection."
  },
  "source": "meta"
}