AI-Studio-Blueprint-Kit is a public Python package and source repository for reusable utilities that support AI Studio blueprint development.
This repository is intentionally structured for growth. It starts with the memory_guard module and can later include additional modules under the same top-level package.
A notebook-oriented RAM and VRAM resource guard designed for local AI and ML workflows.
Main capabilities:
- checks Linux or WSL RAM availability from
/proc/meminfo - attempts NVIDIA VRAM detection through
nvidia-smi,torch, orpynvml - renders rich notebook warnings and pass/fail status with IPython HTML and Markdown when available
- shuts down the active Jupyter kernel when total hardware is insufficient
Base install:
pip install ai-studio-blueprint-kitWith notebook UI dependencies:
pip install "ai-studio-blueprint-kit[notebook]"With GPU helper dependency:
pip install "ai-studio-blueprint-kit[gpu]"With Torch fallback support:
pip install "ai-studio-blueprint-kit[torch]"from ai_studio_blueprint_kit.memory_guard import run_memory_check_notebook
run_memory_check_notebook(
min_total_ram_gb=16.0,
min_total_vram_gb=8.0,
)Lower-level usage:
from ai_studio_blueprint_kit.memory_guard import check_ram, check_vram
ram = check_ram()
vram = check_vram()
print(ram)
print(vram)AI-Studio-Blueprint-Kit/
├── .github/
│ └── workflows/
├── src/
│ └── ai_studio_blueprint_kit/
│ ├── __init__.py
│ └── memory_guard/
│ ├── __init__.py
│ └── core.py
├── tests/
├── LICENSE
├── MANIFEST.in
├── README.md
└── pyproject.toml
New modules should be added under:
src/ai_studio_blueprint_kit/
Examples:
src/ai_studio_blueprint_kit/data_checks/
src/ai_studio_blueprint_kit/model_utils/
src/ai_studio_blueprint_kit/notebook_ui/
This keeps the public import surface consistent:
from ai_studio_blueprint_kit.memory_guard import run_memory_check_notebookCreate a virtual environment and install development dependencies:
pip install -e ".[dev]"Run tests:
pytestBuild package distributions:
python -m buildValidate distributions:
python -m twine check dist/*Recommended release flow:
- publish the repository publicly on GitHub
- test on TestPyPI first
- configure PyPI Trusted Publishing for GitHub Actions
- push a version tag such as
v0.1.0
- The current RAM check is Linux and WSL oriented because it reads
/proc/meminfo. - VRAM detection is primarily intended for NVIDIA environments.
- Notebook rendering is optional and is only used when IPython is available.
- Kernel shutdown on hard failure is intentional in the current
memory_guardbehavior.
MIT