Skip to main content
Pre-release

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

fieldtrial

Find out whether your robot policy actually got better.

CI PyPI License: Apache-2.0

fieldtrial is an open-source Python framework for statistically rigorous, real-world evaluation of robot policies. LeRobot trains the policy; fieldtrial tells you whether it actually got better.

Why

Real-world evaluation is slow, noisy and ad hoc. With 40 rollouts, the 95% confidence interval for a success rate is 12 to 15 percentage points wide on each side, so many apparent improvements from a fine-tuning run are just noise. fieldtrial helps at every stage:

  • Before: how many rollouts do I need? What is the smallest difference this evaluation can detect?
  • During: a randomized, blinded schedule, and a phone-friendly operator console that records the outcome, the furthest stage reached and the failure mode of each rollout.
  • After: the right statistics for the design (exact tests, paired analyses, multiplicity control), honest wording, and a self-contained report.

30-second demo

$ uvx fieldtrial compare 74/80 91/120
Arm 1: 74/80 = 92.5% (95% CI 84.6%–96.5%)
Arm 2: 91/120 = 75.8% (95% CI 67.4%–82.6%)
Difference +16.7 pp, Newcombe 95% CI [+6.2 pp, +26.0 pp]
Boschloo p = 0.0020 (two-sided); rejects H0 at α = 0.05
Fisher p = 0.0022

$ uvx fieldtrial power --p1 0.76 --p2 0.90      # rollouts needed to detect 76% → 90%
112 per arm (pooled-z)

$ uvx fieldtrial demo                           # a simulated study in the console

fieldtrial demo opens a half-run, blinded study with a simulated robot. Run the rest from the keyboard (Space, Space, Enter), unblind, and read the report.

The operator console on a phone: a trial in progress with its blind code, timer and a large Stop button Labelling a trial: furthest stage reached, why it ended, failure tags

The HTML report: summary, success rate per arm with confidence intervals, primary analysis and a forest plot

Quickstart

$ uv tool install fieldtrial              # or: pip install fieldtrial
$ fieldtrial init my-study                # writes my-study/study.yaml
$ fieldtrial plan my-study --baseline 0.75
$ fieldtrial lock my-study                # freezes the design and randomizes the schedule
$ fieldtrial serve my-study --lan         # scan the QR code with a phone at the robot
$ fieldtrial unblind my-study
$ fieldtrial report my-study              # my-study/reports/report.html

A study is one folder: study.yaml (the design) and a SQLite database. Everything is local and works offline; fieldtrial sends no telemetry.

What you get

  • Design: randomized complete blocks with balanced arm order, blind codes, a design hash, locking and logged amendments.
  • Console: sessions with a rig checklist, a timer, stage and failure-tag labels, 10-second undo, invalid trials with automatic rescheduling, a live mirror screen, keyboard and foot-pedal keys, LAN access with a QR code.
  • Analysis: the primary test follows from the locked design (exact McNemar with a Tango interval, Cochran–Mantel–Haenszel, or Cochran's Q with Holm), plus an independent-samples sensitivity analysis, stage funnels, time to success, drift checks and a list of every deviation from the plan.
  • Reports: self-contained HTML with charts, Markdown for pull requests, and a versioned JSON results model.
  • Integration: a REST API with a dependency-free Python client for custom runtimes, CSV import and export, and fieldtrial.stats as a library.

Every statistical function is tested against an independent reference implementation. Reports only describe a difference when the pre-registered test rejects; otherwise they say what the study could have detected.

How it fits with LeRobot and openpi

fieldtrial complements LeRobot and openpi and never forks them. It is not a training framework, a simulation benchmark, a robot driver, a labeling platform or a cloud service. In manual mode, fieldtrial schedules and records the trials and you run the robot however you like. Runners that launch LeRobot rollouts and route openpi traffic for real blinding are planned for v0.2; see the roadmap.

How to cite

If fieldtrial helps your research, please cite it (see CITATION.cff):

@software{benko_fieldtrial,
  author  = {Benko, Rok},
  title   = {fieldtrial: statistically rigorous real-world evaluation for robot policies},
  url     = {https://github.com/rokbenko/fieldtrial},
  license = {Apache-2.0}
}

For evaluation practice in general, see Kress-Gazit et al. (2024), Robot Learning as an Empirical Science: Best Practices for Policy Evaluation, arXiv:2409.09491.

Development

See CONTRIBUTING.md.

Metadata

Release files for fieldtrial 0.1.0rc1

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

Source distribution (sdist)

Source distribution for fieldtrial 0.1.0rc1
File Size Uploaded
fieldtrial-0.1.0rc1.tar.gz 197.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fieldtrial 0.1.0rc1
File Interpreter ABI Platform
fieldtrial-0.1.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 378.6 kB

Release files / fieldtrial-0.1.0rc1.tar.gz

Download URL fieldtrial-0.1.0rc1.tar.gz
Size 197.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f4396db97bc4c83a36c82592f9e7a1e288f67cdcec03c8b6353eb84e0bdc5015
BLAKE2b-256 checksum
How to use checksums
b12767a163e026c882a46e2e1203b1957bf5a4179ace893376e34cb9f02f2403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / fieldtrial-0.1.0rc1-py3-none-any.whl

Download URL fieldtrial-0.1.0rc1-py3-none-any.whl
Size 181.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdc2766300275220f27468c01ec11465d8182d55a99373fd6694c56040d7794c
BLAKE2b-256 checksum
How to use checksums
f6aacdac079806cde099c9148ebd8ce470167e278f00701759207b13fc8c6867
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12
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