Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

JobDock Python SDK

The SDK adds optional progress, scalar metrics, parameters, structured events, artifact registration, and cooperative cancellation to a JobDock job. It has no runtime dependencies outside the Python standard library.

from jobdock import current_job

job = current_job()
job.progress(0.5)
job.metric("loss", 0.42, step=10)

# Units and metadata describe the series and stay stable for the attempt.
job.metric("throughput", 128.4, step=10, unit="samples/s", metadata={"split": "train"})

# Write checkpoints atomically beneath JOBDOCK_OUTPUT_DIR, then request a
# durable, resumable synchronization. The result is True only after the server
# confirms the complete immutable generation.
save_checkpoint(job.output_dir / "epoch-10.pt")
checkpoint_confirmed = job.sync(label="epoch 10", step=10, metadata={"score": 0.91}, timeout=60)

if job.should_stop():
    save_checkpoint()

Typed batches preserve observation order and accept explicit timezone-aware timestamps:

from datetime import datetime, timezone
from jobdock import Metric, current_job

job = current_job()
job.metrics([
    Metric("train/loss", 0.42, step=10, timestamp=datetime.now(timezone.utc), unit="ratio", metadata={"dataset": "cifar10"}),
    Metric("train/accuracy", 0.91, step=10, unit="ratio", metadata={"dataset": "cifar10"}),
])

unit and metadata are series descriptors for one metric name and attempt. Omitted descriptor fields inherit the existing values; conflicting values are rejected as a whole batch. Use distinct names such as train/loss and validation/loss for semantically different series.

Milestones can describe weighted stages. JobDock calculates global progress while retaining the current segment and upcoming stages independently for each attempt:

from jobdock import Milestone

job.define_milestones([
    Milestone("prepare", weight=0.1),
    Milestone("train", weight=0.8),
    Milestone("evaluate", weight=0.1),
])
job.milestone("prepare")
job.progress(0.5, milestone="train", step=10)

Confusion matrices remain structured data rather than rendered images. They support an explicit step and timestamp and are bounded to 128 classes and a 1 MiB encoded payload:

job.confusion_matrix(
    "validation",
    [[48, 2], [3, 47]],
    ["negative", "positive"],
    step=10,
)

The SDK exports presentation-independent CheckpointObservation, ProgressObservation, Milestone, and MatrixObservation contracts. These types contain no chart or React concepts.

Outside JobDock, current_job() returns a no-op object. Use current_job(required=True) when missing execution context should be an error.

Versioning

jobdock-sdk uses the JobDock product release tag as its only release-version source. A tag such as v0.3.0 builds Python package version 0.3.0; SemVer prereleases are converted deterministically to PEP 440, for example v0.3.0-rc.1 becomes 0.3.0rc1. The installed version is available as jobdock.__version__ and is also used in the SDK HTTP user agent.

An untagged source build has an explicit 0.0.0.dev0+g<commit> version and is never indistinguishable from a release. Release automation supplies JOBDOCK_RELEASE_TAG and JOBDOCK_PRODUCT_VERSION; inconsistent values fail the package build instead of publishing mismatched artifacts.

Checkpoint uploads are chunked, acknowledged, and resumed from the server's durable offset after a network or agent restart. A partially uploaded generation never replaces the last confirmed checkpoint. The latest confirmed generation remains downloadable for a LOST job from GET /api/v1/jobs/{job_id}/checkpoints/latest.zip.

Release files for jobdock-sdk 0.2.1rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jobdock-sdk 0.2.1rc2
File Size Uploaded
jobdock_sdk-0.2.1rc2.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jobdock-sdk 0.2.1rc2
File Interpreter ABI Platform
jobdock_sdk-0.2.1rc2-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / jobdock_sdk-0.2.1rc2.tar.gz

Download URL jobdock_sdk-0.2.1rc2.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0fa13ea90921af28ae2937488af67a50947318b925da40aab45f275a8cbda167
BLAKE2b-256 checksum
How to use checksums
bcec4acd20b8c53032c7901d83851a9093013c3108412cbebcdde48856b2310e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / jobdock_sdk-0.2.1rc2-py3-none-any.whl

Download URL jobdock_sdk-0.2.1rc2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bd3e9ac8768240be5f15c09da28cd1737f961df1d49c7a9302b4417b0f46694
BLAKE2b-256 checksum
How to use checksums
cab574d7788f1a669a4c031939603ea44deb47bdce7e70ca5d9d640490823192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log
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