Local-first experiment journal for the GPUPulse Mac and iPhone apps
Project description
GPUPulse Python SDK
GPUPulse is a local-first experiment journal for the GPUPulse Mac, iPhone and Android apps. Training writes only to an append-only file; it never waits for the Mac, a network request or a hosted tracking server.
Five-minute start
1. Install
python -m pip install gpupulse
During local development, install this checkout instead:
python -m pip install -e ./python
2. Add three calls
import gpupulse
run = gpupulse.init(
project="lnet",
name="fair-boundary",
group="ablation-july",
tags=["b200", "baseline"],
notes="First run with the new sampler",
config={"batch_size": 64, "learning_rate": 1e-4},
)
for step in range(100):
loss, accuracy = train(step)
gpupulse.log(
{"loss": loss, "accuracy": accuracy},
step=step,
progress=(step + 1) / 100,
)
gpupulse.finish()
The Mac collector discovers new events over the existing SSH connection. Progress, ETA, live metrics and completion alerts then appear in GPUPulse.
3. Confirm the agent
gpupulse status
gpupulse runs --limit 10
The default journal is ~/.gpupulse/journal/events.jsonl. Override it with GPUPULSE_JOURNAL.
Context manager
from gpupulse import Run
with Run(project="lnet", name="fair-boundary", tags=["nightly"]) as run:
run.config({"batch_size": 64})
for step in range(100):
run.log({"loss": 1 / (step + 1)}, step=step, progress=(step + 1) / 100)
Exceptions and SIGTERM are recorded as failures. A normal context exit records success.
Decorator
import gpupulse
@gpupulse.track(project="research", tags=["quick-check"], inject_run=True)
def train_model(dataset, run=None):
run.config({"dataset": dataset.name})
...
Both synchronous and async functions are supported. The original exception is always re-raised after it is journaled.
PyTorch Lightning
from gpupulse import GPUPulseLightningCallback
trainer = Trainer(callbacks=[
GPUPulseLightningCallback(
project="vision",
name="resnet50",
group="imagenet-sweep",
tags=["lightning", "b200"],
)
])
The callback reads callback_metrics, global_step and estimated_stepping_batches. GPUPulse does not import or install Lightning itself.
Hugging Face Trainer
from gpupulse import GPUPulseTrainerCallback
trainer = Trainer(
...,
callbacks=[GPUPulseTrainerCallback(
project="llm",
name="lora-7b",
tags=["transformers", "lora"],
)],
)
on_log values become GPUPulse metrics and global_step / max_steps becomes progress.
Journal operations
gpupulse status --json
gpupulse runs --project lnet --limit 20 --json
gpupulse export --since 0 --format jsonl
gpupulse prune --keep-days 30
Set retention_days=30 on Run, or set GPUPULSE_RETENTION_DAYS=30, to prune at most once per day. Pruning changes the cursor generation so a Mac holding an older cursor safely re-reads retained events instead of skipping them.
Privacy and performance
- No network dependency is added to training.
- Metric calls use a bounded background queue and never wait for disk.
- Config keys containing passwords, secrets, tokens, API keys or credentials are recursively redacted.
- Use
config_allowlist=[...]when only explicitly approved config keys should be stored. - SSH credentials, full commands and working directories are never written by this SDK.
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 gpupulse-0.3.0.tar.gz.
File metadata
- Download URL: gpupulse-0.3.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2649f1ac754448ecf56673e1f458c6308ec5b197ad3d1e20475a181988dcb3e2
|
|
| MD5 |
d04cdfaf35863a2ac1e042d62554bbbc
|
|
| BLAKE2b-256 |
75c4e81d8f4e040ce9ed4b4ee6d1621e4cb861e83d8718f913b83e8a36c2f1ca
|
File details
Details for the file gpupulse-0.3.0-py3-none-any.whl.
File metadata
- Download URL: gpupulse-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7e65868c0e70673ee101d33f4d25f6b7d9b6e79497af886b4ae82efb4c949fe
|
|
| MD5 |
ab8be5b05fc49dbf23503be6967934fb
|
|
| BLAKE2b-256 |
1fe0b39e3610421f3fb8f595f9810077dff122559dd32062605dc6fe988d1183
|