Skip to main content

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, or pynvml
  • 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:

  1. publish the repository publicly on GitHub
  2. test on TestPyPI first
  3. configure PyPI Trusted Publishing for GitHub Actions
  4. 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_guard behavior.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_studio_blueprint_kit-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_studio_blueprint_kit-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for ai_studio_blueprint_kit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2a8cff58e60bd8c32073a5aae0e18607ba96ee6cc4c391fb951ac32e9774e430
MD5 2c93a8aa07745267123012e537047b33
BLAKE2b-256 c2976bee52b75bf99bbfb389536ef8f9453959f16cd5d016ab94bf064c065d72

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ai_studio_blueprint_kit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_studio_blueprint_kit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3109e14ec1cfab8ba2bc5a4771afb7a3d67d7b2df037966090d4d377ec1433f3
MD5 daccb7483c86c00eff01b6b8f05a72e1
BLAKE2b-256 cb86f925a093ca09899ac396402253df5bd78e8c261401dedd707cda8eabc6a5

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page