This project has been archived by its maintainers, and is no longer receiving any updates.
verifiable-labs
Python SDK for the Verifiable Labs Hosted Evaluation API — evaluate frontier LLMs on conformal-calibrated scientific RL environments without writing any HTTP plumbing.
v0.1.0a1 — alpha. The Hosted Evaluation API itself is v0.1.0-alpha (open / rate-limited / no auth / single-process session store). This SDK is a thin httpx wrapper that mirrors the 8-endpoint API surface; it'll keep working when we add auth + persistence in v0.2.
Install
pip install verifiable-labs
Python >=3.11 required.
Quickstart
Synchronous
from verifiable_labs import Client
with Client() as client: # localhost:8000 by default
print(client.health().version) # "0.1.0-alpha"
env = client.env("stelioszach/sparse-fourier-recovery")
result = env.evaluate(
seed=0,
answer='{"support_idx": [12, 47, 91], "support_amp_x1000": [800, -300, 1200]}',
env_kwargs={"calibration_quantile": 2.0},
)
print(f"reward={result.reward:.3f} parse_ok={result.parse_ok}")
Asynchronous
import asyncio
from verifiable_labs import AsyncClient
async def main():
async with AsyncClient(base_url="https://api.verifiable-labs.com") as client:
env = client.env("sparse-fourier-recovery")
# Multi-turn flow: keep submitting until session.complete is True
session = await env.start_session(seed=42)
while not session.complete:
answer = my_agent.solve(session.observation) # your code
await session.submit(answer_text=answer)
print("turns:", len(session.history))
asyncio.run(main())
Leaderboard
lb = client.leaderboard("sparse-fourier-recovery")
for row in lb.top_models(n=3):
print(f"{row.model:35s} mean={row.mean_reward:.3f} n={row.n}")
Public surface
| name | sync / async | purpose |
|---|---|---|
Client(api_key=None, base_url=...) |
sync | top-level client |
AsyncClient(api_key=None, base_url=...) |
async | top-level client |
client.health() |
both | liveness + version |
client.environments() |
both | list all 10 envs |
client.env(env_id) |
both | returns Environment handle |
client.leaderboard(env_id) |
both | aggregated benchmark numbers |
env.evaluate(seed, answer) |
both | one-shot eval, returns SubmitResponse |
env.start_session(seed) |
both | returns multi-turn Session |
session.submit(answer_text=...) |
both | append a turn, returns score |
session.history |
sync (property) | list of past SubmitResponses |
session.complete |
sync (property) | bool — env signalled done |
session.refresh() |
both | re-fetch state from the server |
Exceptions
The SDK raises typed exceptions on non-2xx HTTP status codes; callers
can except on the specific failure mode.
from verifiable_labs import (
VerifiableLabsError, # base class
TransportError, # network / timeout
InvalidRequestError, # 400 / 422
NotFoundError, # 404
RateLimitError, # 429
ServerError, # 5xx
)
Configuration
Client(
api_key=None, # forward-compat for v0.2; no effect in v0.1
base_url="http://localhost:8000",
timeout=30.0, # httpx total-timeout in seconds
http_client=None, # inject your own httpx.Client for custom transport
)
AsyncClient takes the same args + accepts an httpx.AsyncClient.
What's NOT in v0.1
Same caveats as the Hosted Evaluation API:
- No authentication.
api_key=is accepted for forward-compat but unused. - Multi-turn sessions don't yet route turns through the env's
residual-feedback rollout (server records turns but doesn't
dispatch). The SDK exposes the full
SessionAPI anyway so the shape is stable for v0.2. - Structured
answerdicts return HTTP 422; pass strings. - No persistence — session store is in-memory on the API side.
License
Apache-2.0. See LICENSE.
Metadata
Release files for verifiable-labs 0.1.0a5
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 |
|---|---|---|---|---|
| verifiable_labs-0.1.0a5.tar.gz | 27.2 kB | Without provenance | Details for verifiable_labs-0.1.0a5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| verifiable_labs-0.1.0a5-py3-none-any.whl | Python 3 | none | any | Details for verifiable_labs-0.1.0a5-py3-none-any.whl |
Total release size: 52.1 kB
Release files / verifiable_labs-0.1.0a5.tar.gz
| Download URL | verifiable_labs-0.1.0a5.tar.gz |
|---|---|
| Size | 27.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
395f5619b09c26dde2b10c8728cf5898a5db1e64b989daf68cf99d769d5f5f11
|
|
BLAKE2b-256 checksum How to use checksums |
e1f416af8c5736d6ece9412b0861c9f321aa2bd7fa2d449c644501a5eff54060
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / verifiable_labs-0.1.0a5-py3-none-any.whl
| Download URL | verifiable_labs-0.1.0a5-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d409ead42e956c8ebf2a0f3b30e54850db048c5ba4c4b2637ccdb54fd1086d43
|
|
BLAKE2b-256 checksum How to use checksums |
2f5251b6513c4e1b2490146e512a0fc2a61cb242bdbe64ed667ec4a6586b2b1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for verifiable-labs 0.1.0a5
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.