Skip to content
Back to skills

Colab Ram Safe

ASecurity

Patterns for RAM-limited notebooks: windowed reads, patch shards, progress files, Drive checkpoints.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agents

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add Adilmunawar/ZD-claude-plugin --skill colab-ram-safe --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Colab Ram Safe?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Colab Ram Safe
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adilmunawar-colab-ram-safe/badge)](https://www.skillsdirectory.com/skills/adilmunawar-colab-ram-safe)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: colab-ram-safe
description: Patterns for RAM-limited notebooks: windowed reads, patch shards, progress files, Drive checkpoints.
---

- Mount Drive once; keep datasets on Drive as COGs/parquet; copy the *current* tile to `/content` only.
- Never load a full raster: `rasterio.open` + `read(window=...)`; for GEE exports use `Export.image.toDrive` with `fileDimensions` so tiles are ≤ ~2 GB.
- Extract patches to `.npy`/`.zarr` shards on disk with an index CSV; the Dataset reads shards lazily.
- Checkpoint every N tiles to a JSON progress file; make every loop resumable from it.
- Free memory: `del arr; gc.collect(); torch.cuda.empty_cache()` after each tile; watch `psutil.virtual_memory()`.
- Long jobs: run as a `.py` with `nohup` inside Colab, log to a file on Drive, poll from a cell.
- Session timeout insurance: save `last.pt` to Drive every epoch; store the config next to it.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…