Spaces:
Running
Persistent Storage Bug: Data in /data not surviving restarts on Spaces
Hello,
Iโm running a custom Space on the L40S GPU with persistent storage enabled (20GB Small tier). My code correctly writes memory files into /data (confirmed by logs such as [SEMANTIC_SAVE] Saved memory entries: X and [SQLITE_WRITE] Logged convo for guest_user).
โ During runtime, everything works perfectly:
My app reads/writes JSON + SQLite files from /data.
I can see [SEMANTIC_LOAD] Loaded memory entries: X after saving.
โ But after a restart or GPU switch, I consistently get:
[SEMANTIC_LOAD] No memory file found, starting empty.
[BOOTSTRAP] Loaded 0 semantic facts for guest_user
This shows my files in /data are erased even though persistent storage should survive restarts (as described in the docs).
I have already:
Ensured all paths use /data/... (not /mnt/data).
Verified my app prints the correct file paths at startup.
Restarted the Space vs Pausing/Resuming โ the result is the same: files disappear.
๐ Could this be a bug with persistent storage on Spaces? Or are there additional steps needed to ensure files survive GPU resets?
Any guidance would be appreciated โ right now this makes persistent memory unusable for my AI app.
Thanks so much!