Skip to main content

sparks

Training runs on your DGX Spark, with the curves next to the hardware they ran on.

Submit a training job from your laptop with one command. sparks builds your image, ships it to the box, queues the run and supervises it. Your loop reports its own loss and learning rate, and they land in Grafana beside the GPU power and temperature from the same minutes.

A training run in Grafana

Before you run it

sparks provisions nothing. It needs a box already set up by sparkup: Prometheus with the remote-write receiver, Grafana, an image registry and the queue runner. On your own machine you need Docker and SSH to the box.

The distribution is sparks-dgx; the command and the import are both sparks.

Install

uv tool install sparks-dgx
sparks setup you@your-box

setup remembers the box, lets your Docker push to its registry, restarts Docker, and says when it is ready. The restart stops whatever containers you have running.

Submit a job

sparks submit --context ./examples --data ./examples/data \
  --name lora-r16 -- python /app/lora_finetune.py --epochs 12

--data arrives read-only at /data, also $SPARKS_DATA; read that path and never a laptop one. Name the script by absolute path, because the container's working directory is the box's shared directory rather than your image's.

Instrument the loop

from sparks.emit import track

with track(total=epochs * len(loader), tokens_per_step=batch_size * BLOCK) as run:
    for batch in loader:
        loss = train_one(batch)
        run.step(loss=float(loss))

run.step derives step, progress, eta_seconds and the rates. Off the box track reports nothing, so the same script runs on your laptop unguarded.

Watch it

sparks queue            # what is running and waiting
sparks logs <job>       # what it printed
sparks status <job>     # state, exit code, duration, energy
sparks wait <job>       # block until it ends

The README has the rest, and INSTALL_CLAUDE.md has the configuration and the traps.

MIT.

Download files

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

Source Distribution

sparks_dgx-0.1.1.tar.gz (489.8 kB view details)

Uploaded Source

Built Distribution

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

sparks_dgx-0.1.1-py3-none-any.whl (57.7 kB view details)

Uploaded Python 3

File details

Details for the file sparks_dgx-0.1.1.tar.gz.

File metadata

  • Download URL: sparks_dgx-0.1.1.tar.gz
  • Upload date:
  • Size: 489.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sparks_dgx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 de98e9194086a8e1a2aa186d39a73daa1db730eb5bf00b51a274acbb9e013aa0
MD5 526f6b0475268bfbc08f45d5d89122a2
BLAKE2b-256 5ba5e36daa958cff037a2bacca7a3a56f37c77ad8c41ca74b6b5dde7e159363f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sparks_dgx-0.1.1.tar.gz:

Publisher: release.yml on vtemian/sparks

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

File details

Details for the file sparks_dgx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sparks_dgx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 57.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sparks_dgx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eeb2607eed3099c6ffb0bffd2601e4ca4c2c9e7d242b6b68764ed1b12777c413
MD5 c48684b1172c5e1a9dd15814dcf54a8b
BLAKE2b-256 fcb5dd4c628792e032e0afae395b2ff05c35705befd5a2940f69f36296eff681

See more details on using hashes here.

Provenance

The following attestation bundles were made for sparks_dgx-0.1.1-py3-none-any.whl:

Publisher: release.yml on vtemian/sparks

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page