dvbench client
The dvbench Python client creates named experiments, tails a live ZKDV records.cborl transcript, and sends each
complete CBOR item in a CBOR transport envelope. Records above the shared chunk
threshold use multiple acknowledged messages and are reassembled before worker
validation. The client does not interpret or validate records. Record shape, cryptographic, and
protocol validation are entirely the server's responsibility.
The process uses placeholder user_id zero and generates a client_id at
startup. Each record_id is the BLAKE3 digest of the exact encoded record
bytes, and the first record's ID is the stable transcript_id. Record events
are numbered from zero. On SIGINT or SIGTERM, the client sends a Close event
whose sequence is the next expected value and waits for its acknowledgement.
A failed record send is retried in memory; restarting the client replays the
transcript under a new client_id.
The public lifecycle is:
from dvbench import Client
experiment = Client().experiment("owner/model")
proof = experiment.proof(backend="jax")
# Train through the ordinary ZKDV API, then close the proof before measuring.
proof.finish()
measurement = experiment.measure(checkpoint)
@measurement.evaluate(params=0, batch=1)
def evaluate(params, batch):
return score(params, batch)
@measurement.aggregate
def aggregate(outputs):
return sum(outputs) / len(outputs)
measurement.submit("accuracy", measurement.run(checkpoint, batches))
Measurement definitions and benchmarks use the same client rather than a separate HTTP integration:
accuracy = client.define_measurement("accuracy", "Held-out exact-match accuracy.")
benchmark = client.create_benchmark(
"Core evaluations",
"Primary held-out evaluation suite.",
[accuracy["id"]],
accuracy["id"],
)
Checkpoint stores and mock generators that already have the compact inner
Merkle root can use experiment.measure_opening(inner_root). If an experiment
has more than one run, pass the intended transcript_id. The projected leaves
are never sent to the API or retained in SQLite.
measure(checkpoint) downloads the selected run's probe-vector object in chunks,
verifies and caches its object hash for the client lifetime, then projects and
hashes one leaf at a time. The worker accepts the compact opening only when it
matches an attested update boundary. Evaluation outputs remain submitter-reported;
the client signs their trace but does not attest their execution.
measurement.run(...) serializes each complete input batch and output tensor
as canonical, content-addressed CBOR. measurement.submit(...) streams those
objects to the API before sending the small signed trace of digest/length
references. The worker, rather than the client, derives sample alignment from
the batch dimension. Uploads are bounded-concurrent and content-deduplicated
for the client session. Temporary client objects are removed after submission.
The native uploader uses these environment variables when configured directly:
ZKDV_RECORDS_PATH— transcript path; defaults to../zkdv/proof/records.cborlwhen run from the dvbench root.DVBENCH_STREAM_URL— WebSocket destination.DVBENCH_CLIENT_POLL_MS— file polling interval; defaults to100.DVBENCH_CLIENT_RECONNECT_MS— reconnect delay; defaults to1000.
Python development
Build and install the mixed Python/Rust package into its project environment with:
uv sync --all-extras --dev
The Maturin backend declared in pyproject.toml builds and installs the native
uploader and protocol helpers as dvbench._core.
Build the distributable source archive and platform wheel with the standard PEP 517 path:
uv build
Documentation
Build or preview the Zensical site through the project environment:
uv run --group docs zensical build --strict
uv run --group docs zensical serve
Metadata
Release files for dvbench 0.0.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 |
|---|---|---|---|---|
| dvbench-0.0.0.tar.gz | 275.1 kB | Without provenance | Details for dvbench-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dvbench-0.0.0-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details for dvbench-0.0.0-cp312-cp312-macosx_11_0_arm64.whl |
Total release size: 1.2 MB
Release files / dvbench-0.0.0.tar.gz
| Download URL | dvbench-0.0.0.tar.gz |
|---|---|
| Size | 275.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60e8222ea1b119802263ccefd23fa25fd1235475c2be16abd1a9e0c37b1673f6
|
|
BLAKE2b-256 checksum How to use checksums |
b9492b26822f11bc137719ccc09d18f85fda9f1f368d255b09230db3ae8f43eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / dvbench-0.0.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | dvbench-0.0.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 920.4 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8f80ae93199491ef3e8990718927563c954e8ced82efe238dca56708e0eb07c0
|
|
BLAKE2b-256 checksum How to use checksums |
fcc481af734ee8284bde565ebcfed22c1553018c5c636006fb80a9d2e1a591ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for dvbench 0.0.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.