Reusable Python utilities for HP AI Studio and notebook-centric ML workflows.
Project description
AI-Studio-Blueprint-Kit
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.
Current module
ai_studio_blueprint_kit.memory_guard
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
Installation
Base install:
pip install ai-studio-blueprint-kit
With 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]"
Usage
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)
Repository layout
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
Adding future modules
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_notebook
Development
Create a virtual environment and install development dependencies:
pip install -e ".[dev]"
Run tests:
pytest
Build package distributions:
python -m build
Validate distributions:
python -m twine check dist/*
Publishing
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
Notes
- 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.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_studio_blueprint_kit-0.1.0.tar.gz.
File metadata
- Download URL: ai_studio_blueprint_kit-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a8cff58e60bd8c32073a5aae0e18607ba96ee6cc4c391fb951ac32e9774e430
|
|
| MD5 |
2c93a8aa07745267123012e537047b33
|
|
| BLAKE2b-256 |
c2976bee52b75bf99bbfb389536ef8f9453959f16cd5d016ab94bf064c065d72
|
Provenance
The following attestation bundles were made for ai_studio_blueprint_kit-0.1.0.tar.gz:
Publisher:
publish.yml on HPInc/AI-Studio-Blueprint-Kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_studio_blueprint_kit-0.1.0.tar.gz -
Subject digest:
2a8cff58e60bd8c32073a5aae0e18607ba96ee6cc4c391fb951ac32e9774e430 - Sigstore transparency entry: 1308332993
- Sigstore integration time:
-
Permalink:
HPInc/AI-Studio-Blueprint-Kit@f823e03a5dde43388f07c12da7933b5fee88946d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HPInc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f823e03a5dde43388f07c12da7933b5fee88946d -
Trigger Event:
push
-
Statement type:
File details
Details for the file ai_studio_blueprint_kit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_studio_blueprint_kit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3109e14ec1cfab8ba2bc5a4771afb7a3d67d7b2df037966090d4d377ec1433f3
|
|
| MD5 |
daccb7483c86c00eff01b6b8f05a72e1
|
|
| BLAKE2b-256 |
cb86f925a093ca09899ac396402253df5bd78e8c261401dedd707cda8eabc6a5
|
Provenance
The following attestation bundles were made for ai_studio_blueprint_kit-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on HPInc/AI-Studio-Blueprint-Kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_studio_blueprint_kit-0.1.0-py3-none-any.whl -
Subject digest:
3109e14ec1cfab8ba2bc5a4771afb7a3d67d7b2df037966090d4d377ec1433f3 - Sigstore transparency entry: 1308333057
- Sigstore integration time:
-
Permalink:
HPInc/AI-Studio-Blueprint-Kit@f823e03a5dde43388f07c12da7933b5fee88946d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HPInc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f823e03a5dde43388f07c12da7933b5fee88946d -
Trigger Event:
push
-
Statement type: