Pack GPU jobs onto shared cards by the memory they actually use.
Most single-machine schedulers hand out whole GPUs, so a job that needs 9 GB holds an 80 GB card while others wait. pinka is a job pool for one machine that books each job at the VRAM it really uses and stacks as many as fit on each card. The name is Mandarin pīn kǎ (拼卡): sharing a card, the way people share a taxi.
- Measured booking. A job starts at its declared VRAM; once it has run a while, or its name has a history, it is booked at its measured peak, and the space it frees goes to the next job.
- Chains and retries.
--afterdependencies,--tries, requeue on CUDA out-of-memory. Every job ends with aDONEorERRORmarker that any script can wait on. - Guards. A job far above its declaration is stopped and requeued before it takes a neighbour down; host RAM is admitted and guarded too.
- Nothing to set up. No root, no database (the state is a folder of JSON files), Python standard library only.
pinka is a slimmed port of a private pool that ran about 53,000 jobs a month on a shared multi-GPU box.
Install
pip install pinka # or: uv tool install pinka
pip install 'pinka[nvml]' # optional: read the cards through NVML instead of nvidia-smi
GPU jobs need Linux and NVIDIA drivers; elsewhere pinka runs CPU-only jobs.
Quickstart
pinka daemon & # the dispatcher; keep it running (tmux, systemd user unit)
A=$(pinka submit --name eval-1 --vram 6 -- python eval.py --shard 1)
B=$(pinka submit --name eval-2 --vram 6 -- python eval.py --shard 2)
pinka submit --name report --vram 0 --after $A,$B -- python report.py
pinka status # per card: used, booked, free; which jobs run where
pinka wait $A $B # block until both end; exit 0 if all are done
--vram is the peak VRAM in GB; --vram 0 makes a CPU-only job.
Why not X
| Tool | Why it does not fit this case |
|---|---|
task-spooler (ts -G), simple_gpu_scheduler |
each job gets whole free cards |
| pueue | a fine queue, but it does not know about GPUs |
Ray (num_gpus=0.25) |
fractions are set by hand and never measured; a large dependency |
| Slurm GRES shards | needs root and cluster setup |
If each of your jobs needs a whole GPU, task-spooler or pueue is the simpler choice.
Learn more
Every command, the booking and guard rules, the state layout, hooks and configuration are in AGENTS.md. It is written for people and coding agents alike: point your AI at it.
Licence
MIT (LICENSE). Copyright (c) 2026 Gao Chengzhi.
Metadata
Release files for pinka 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pinka-0.1.0.tar.gz | 44.4 kB | Without provenance | Details for pinka-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pinka-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pinka-0.1.0-py3-none-any.whl |
Total release size: 85.0 kB
Release files / pinka-0.1.0.tar.gz
| Download URL | pinka-0.1.0.tar.gz |
|---|---|
| Size | 44.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbdfa86e63dfc2f5b4d46a96fe6b58541a9554a22bbe55466d8e9c40be73f33c
|
|
BLAKE2b-256 checksum How to use checksums |
2ec3aae30afd79bdd20deaedc6df45d5225c7c9d106dd651ebdccec84c6a27a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / pinka-0.1.0-py3-none-any.whl
| Download URL | pinka-0.1.0-py3-none-any.whl |
|---|---|
| Size | 40.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6b7e5c3bac3337e3439d9c245d8fa2026fb63a4ddae7cb6882e986969ae124d
|
|
BLAKE2b-256 checksum How to use checksums |
f037cfe4f9da4ee636323c2ca6ce5cfa73a9e7544cad391996752ebaad3e4696
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for pinka 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.