Skip to main content

Python client + typed contract for the BenchHub benchmarking platform

Project description

BenchHub

BenchHub is an open-source benchmarking platform: pick a dataset, define metrics in Python, upload predictions, and see how your model ranks. Live at https://runbenchhub.com.

Originally built as a private dTOF SPAD pipeline benchmarking tool, then generalized into a public, multi-tenant web app.

Features

  • OAuth sign-in (GitHub) — no passwords; one-click account creation.
  • Datasets and leaderboards are global — no project namespace.
  • Per-row visibility (public / unlisted / private) on datasets, leaderboards, and metric/visualization library entries.
  • HuggingFace import: pull a structured HF dataset repo as a one-click alternative to a ZIP upload (see scripts/seed_nyu_v2_curated.py for an example workflow).
  • User-defined metrics in Python — bring your own scoring code; the metric engine resolves dependencies and runs them per-sample or aggregated. Sandbox-isolated when BENCHHUB_SANDBOX_METRICS=1.
  • Asynchronous processing with Celery (Redis broker).
  • Per-user quotas: 50 MB storage, 5 datasets, 50 submissions / 24h by default. Free-tier safe to expose to the open internet.
  • API tokens for programmatic uploads (/settings/api_tokens).
  • Account deletion (GDPR right-to-be-forgotten) with cascading cleanup.
  • Public landing page at /, /leaderboards for browsing the catalog, /u/<id> for public profile pages.

Prerequisites

  • Python 3.10+
  • Redis (broker + result backend, default port 6379)

Installation

git clone <repository-url>
cd BenchHub
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt

Running

Three terminals:

# 1. Redis
redis-server

# 2. Celery worker
celery -A app.celery worker --loglevel=info

# 3. Flask app
python app.py

Then open http://localhost:6060.

Data lives outside the repo at ~/.dtofbenchmarking/ (database + uploads). Override with BENCHHUB_DATA_DIR=/some/path.

Tests

pytest

429 tests, ~3-4 seconds. Coverage gate is configured in pytest.ini.

Dataset / submission ZIP convention

Folders are auto-detected by prefix:

Prefix Type Files
metric_ metric <sample>.txt containing a float
hist_ / raw_histogram / hist histogram <sample>.npz (bins, counts)
raw_ depth/map <sample>_<W>x<H>.npz
(anything else) image / scalar / json / text by file extension

git_info.json (or git.info) at the ZIP root attaches commit metadata to the resulting dataset/submission row.

DLP-safe code uploads

Some networks block .py uploads. The metric editor encodes user code as BASE64:<...> client-side; the server decodes. Standalone helpers:

  • scripts/obfuscator.html — portable browser tool
  • scripts/obfuscator_gui.py — Tkinter GUI

Deployment

The production app is self-hosted on a home Ubuntu 24.04 box (RTX 5090, 128 GB RAM, 8 TB) reachable at https://runbenchhub.com. gunicorn + celery

  • redis run directly under systemd; nginx + certbot terminate TLS; the domain is on Cloudflare in DNS-only mode (no proxy) with ddclient keeping the A record pointed at the home WAN IP.

Operational runbook: docs/SELFHOST_RUNBOOK.md — code-push procedure, .env keys, log tailing, DDNS, TLS renewal, rollback, and the breakages we've already hit.

Fly.io is deprecated: the app was destroyed after the cutover to the home box. The Fly artifacts (fly.toml, Dockerfile, DEPLOY.md, …) are archived under archive/fly/ for the case where a future Fly redeploy needs to be reconstructed.

License

(Choose and add a license file — repository currently has no LICENSE.)

Project details


Download files

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

Source Distribution

benchhub_client-0.1.0.tar.gz (182.4 kB view details)

Uploaded Source

Built Distribution

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

benchhub_client-0.1.0-py3-none-any.whl (54.3 kB view details)

Uploaded Python 3

File details

Details for the file benchhub_client-0.1.0.tar.gz.

File metadata

  • Download URL: benchhub_client-0.1.0.tar.gz
  • Upload date:
  • Size: 182.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for benchhub_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0b93c1ca1a5bc52b9fc76addb15464ef07772cf25be90a76bb9447ac6424a065
MD5 c72eb6f6c9059394f7275136fcb79a4d
BLAKE2b-256 f8eee997633bdcfa2e1199a7ae1c853dbc9f5ad9e38bdf5733e80a3e70c94d0b

See more details on using hashes here.

File details

Details for the file benchhub_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for benchhub_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 287a57eea5ab091fce083b6b392e9867cdb692662f9f9c66b497b87f46111b22
MD5 3d530401dace6b382f5a2f6b40bca3ba
BLAKE2b-256 3f9609ea3fe4cf3d5ed2586789c6dda41dbc09c1a1eddba7f5b46925efd7abc2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page