PrivateLabBench
Evaluate scientific models on private data, from your terminal.
Quickstart · Documentation · v0.1.2 release · Contributing
PrivateLabBench is a local evaluation framework for scientific machine learning. Bring model predictions and a validation table to compare candidates, estimate uncertainty, and find failures across sites, assays, or other groups. Keep the underlying data in your environment and share approved aggregate receipts with collaborators.
Evaluation runs without an account, hosted service, or data upload. A receipt records the evaluation protocol, selected results, and the evidence available to verify them.
Installation
The current release is v0.1.2, available on PyPI and GitHub Releases. CI tests Python 3.10, 3.11, and 3.12.
Create a virtual environment:
python -m venv .venv
Activate it with source .venv/bin/activate on macOS/Linux, or .venv\Scripts\Activate.ps1 in Windows PowerShell. Then install:
python -m pip install private-lab-bench==0.1.2
plb --help
The longer command name, privatelabbench, works too. See the installation guide for optional dependencies and source installs, or open the quickstart in Colab.
Run a first evaluation
Run a bundled synthetic example in a fresh directory and verify its shareable receipt:
mkdir plb-example
cd plb-example
plb list-packs
plb run-pack community-tabular-regression@1.0.0
plb verify reports/benchmark_packs/tabular_regression_receipt.shareable.json
The pack includes predictions, evaluation settings, and an example disclosure policy. It runs from the installed package without a checkout or model download. Other packs cover molecular regression and protein binary classification. Pack and protocol versions are independent of the package release.
Evaluate your predictions
Save a table like this as predictions.csv:
sample_id,target,prediction,site
s01,0.12,0.14,lab-a
s02,0.20,0.23,lab-a
s03,0.33,0.31,lab-b
s04,0.41,0.45,lab-b
plb evaluate predictions.csv --task-type regression --slice site
plb verify reports/evaluation/evaluation_receipt.json
This writes local reports and a receipt. The four rows illustrate the schema; the default bootstrap requires at least 20 observations, and slice metrics require at least five per group. Repeated patients, compounds, or batches need a declared sampling design.
Binary classification and multiclass probability tables are also supported. Class order and probability meaning matter: use explicit labels when needed. The prediction-table reference covers column bindings, missing values, and classification examples.
Save the settings for another run:
plb init predictions.csv --task-type regression --slice site --out evaluation.yaml
plb validate-config evaluation.yaml
plb run evaluation.yaml
Use a versioned evaluation protocol when collaborators need the same metrics, sampling rules, and decision criteria. Receipts bind its identity and digest.
Compare models
Provide one prediction table per model, with identical sample IDs and targets:
plb compare model-a.csv model-b.csv --target target --task-type regression --metric rmse --practical-threshold 0.01
The comparison reports the paired improvement, bootstrap interval, and whether the evidence supports your practical threshold. Subgroup comparisons help locate the difference. See the paired-comparison guide for noninferiority, sampling assumptions, and interval interpretation.
Scientific workflows
| Evaluation needs | Guide |
|---|---|
| Check supported split, entity, or time-overlap rules | Evaluation-design audits |
| Inspect cohort degradation and changing groups | Reference/current diagnostics |
| Apply explicit acceptance thresholds | Quality gates |
| Describe an evaluated model and compare evidence across labs | External validation and receipt aggregation |
| Follow the same model over time | Longitudinal evaluation |
| Evaluate submissions against owner-held labels | Hidden benchmarks |
| Generate predictions from an approved local numeric model | Trusted local scoring |
The initial benchmark integrations reproduce pinned upstream scoring rules:
| Ecosystem | Initial coverage |
|---|---|
| TDC ADMET | Caco2 and PGP tasks with official splits and MAE/AUROC checks |
| Matbench | Selected composition and structure tasks with official folds and aggregation |
| ProteinGym | A pinned DMS substitution subset with assay Spearman and protein/function aggregation |
The Caco2 case study follows a model-selection decision through uncertainty, critical-group checks, approved export, and signature verification. It distinguishes the real public control from a synthetic measurement-shift proxy. Independent researcher onboarding trials remain pending.
Receipts and sharing
| Artifact | Purpose |
|---|---|
<run>_receipt.json |
Local evidence, including paths, configuration, and exact results |
<run>_receipt.shareable.json |
Approved aggregate evidence for exchange |
<run>_receipt.md |
Human-readable receipt summary |
A reviewed release policy controls export. When export is blocked, the run keeps its local results and release audit and removes a previous shareable receipt. Bundled packs use policies for synthetic examples; private-data evaluations need their own review.
plb release-check local_receipt.json --policy release.yaml
plb verify receipt.shareable.json --trust-store trusted-labs.yaml --require-trusted-signer --json
Verification distinguishes artifact integrity from an authenticated signer statement. Execution and scientific validity require separate evidence. The receipt trust guide covers signing and pinned keys.
Keeping rows local limits data movement, but aggregates can still disclose sensitive information. Empirical audits, disclosure policies, and heuristic metric perturbation address different questions. Metric perturbation, including the deprecated dp alias, provides no formal differential privacy guarantee. Read the privacy guide before sharing private results.
Developing and contributing
git clone https://github.com/dipeshbabu/private-lab-bench.git
cd private-lab-bench
python -m pip install -e '.[dev,docs]' build twine
python -m pre_commit install
python -m pre_commit run --all-files
python -m pytest -q
python -m mkdocs build --strict
CI checks supported Python versions, package builds, installation outside the checkout, documentation, Docker, scientific adapters, and repository history. Read CONTRIBUTING.md for extension boundaries and validation requirements.
Report bugs or propose tasks through GitHub Issues. Use the process in SECURITY.md for sensitive vulnerabilities. Contributions follow the Code of Conduct and governance guide.
License and citation
PrivateLabBench uses the MIT license. Cite the release or commit you used with CITATION.cff.
Metadata
Release files for private-lab-bench 0.1.2
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 |
|---|---|---|---|---|
| private_lab_bench-0.1.2.tar.gz | 276.9 kB | With provenance | Details for private_lab_bench-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| private_lab_bench-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for private_lab_bench-0.1.2-py3-none-any.whl |
Total release size: 531.2 kB
Release files / private_lab_bench-0.1.2.tar.gz
| Download URL | private_lab_bench-0.1.2.tar.gz |
|---|---|
| Size | 276.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ef0850377ce6ecc396213e321a0d73c944267d1ddfe299be38c0fe37cef53f0
|
|
BLAKE2b-256 checksum How to use checksums |
14e97c21a3833ac65fb8ee41a2670e3a4141df0e7f8d8c6f79cfd7da50ff4d84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logRelease files / private_lab_bench-0.1.2-py3-none-any.whl
| Download URL | private_lab_bench-0.1.2-py3-none-any.whl |
|---|---|
| Size | 254.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8305bf35528cf9c62ee4cc6d9274a7306d96cf001c6ed0ac0110414d13e94fe1
|
|
BLAKE2b-256 checksum How to use checksums |
45cd43e8c88e57443a490d3ad915dc17c4fdb8f0fa6f0fcf373dce52ccdc926e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 3, 2026.
Transparency logSecurity for private-lab-bench 0.1.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for private_lab_bench-0.1.2.tar.gz
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 Nov 3, 2026.
Transparency logA 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.