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.2.0a1

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.2.0a1
File Size Uploaded
fieldtrial-0.2.0a1.tar.gz 239.9 kB Details

Built distribution (wheel)

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

Total release size: 456.7 kB

Release files / fieldtrial-0.2.0a1.tar.gz

Download URL fieldtrial-0.2.0a1.tar.gz
Size 239.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0c0b95e2c0d546253b4ea7c4c72057e30c93bda9f0116840b8519b1e850e5532
BLAKE2b-256 checksum
How to use checksums
e5a42436551ce98a2acff5dd6ce5af1fc8a2a469d5537350edb1100bc1d15469
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.2.0a1-py3-none-any.whl

Download URL fieldtrial-0.2.0a1-py3-none-any.whl
Size 216.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60e4f04ed22646fca8973dc79cc7c6fbb92d59d00ce7a66cec1fa632706563ab
BLAKE2b-256 checksum
How to use checksums
77cf078f56d3fa6b2321da32b21e035a96da8ef497c59ee0521901c9a662b9b2
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