worldbench 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- worldbench-0.2.0/LICENSE +156 -0
- worldbench-0.2.0/PKG-INFO +438 -0
- worldbench-0.2.0/README.md +393 -0
- worldbench-0.2.0/pyproject.toml +70 -0
- worldbench-0.2.0/setup.cfg +4 -0
- worldbench-0.2.0/tests/test_action_consistency_unavailable.py +163 -0
- worldbench-0.2.0/tests/test_cli.py +63 -0
- worldbench-0.2.0/tests/test_cli_lerobot.py +101 -0
- worldbench-0.2.0/tests/test_dashboard.py +30 -0
- worldbench-0.2.0/tests/test_dataset.py +26 -0
- worldbench-0.2.0/tests/test_evaluator.py +37 -0
- worldbench-0.2.0/tests/test_frame_freeze.py +77 -0
- worldbench-0.2.0/tests/test_lerobot.py +420 -0
- worldbench-0.2.0/tests/test_lerobot_integration.py +91 -0
- worldbench-0.2.0/tests/test_metrics.py +45 -0
- worldbench-0.2.0/tests/test_object_contact_unavailable.py +143 -0
- worldbench-0.2.0/tests/test_temporal_scramble.py +91 -0
- worldbench-0.2.0/worldbench/__init__.py +16 -0
- worldbench-0.2.0/worldbench/backends/__init__.py +15 -0
- worldbench-0.2.0/worldbench/backends/benchmark.py +200 -0
- worldbench-0.2.0/worldbench/backends/demo.py +233 -0
- worldbench-0.2.0/worldbench/backends/frame_freeze.py +117 -0
- worldbench-0.2.0/worldbench/backends/frame_scramble.py +139 -0
- worldbench-0.2.0/worldbench/backends/lerobot.py +1225 -0
- worldbench-0.2.0/worldbench/backends/local.py +23 -0
- worldbench-0.2.0/worldbench/cli.py +463 -0
- worldbench-0.2.0/worldbench/core.py +88 -0
- worldbench-0.2.0/worldbench/dashboard.py +741 -0
- worldbench-0.2.0/worldbench/dataset.py +161 -0
- worldbench-0.2.0/worldbench/metrics/__init__.py +16 -0
- worldbench-0.2.0/worldbench/metrics/action_consistency.py +177 -0
- worldbench-0.2.0/worldbench/metrics/contact.py +118 -0
- worldbench-0.2.0/worldbench/metrics/object_permanence.py +79 -0
- worldbench-0.2.0/worldbench/metrics/temporal.py +59 -0
- worldbench-0.2.0/worldbench/metrics/visual.py +95 -0
- worldbench-0.2.0/worldbench/runners/__init__.py +17 -0
- worldbench-0.2.0/worldbench/runners/benchmark.py +159 -0
- worldbench-0.2.0/worldbench/runners/comparator.py +255 -0
- worldbench-0.2.0/worldbench/runners/evaluator.py +228 -0
- worldbench-0.2.0/worldbench/runners/reporter.py +145 -0
- worldbench-0.2.0/worldbench/schemas.py +169 -0
- worldbench-0.2.0/worldbench/utils.py +152 -0
- worldbench-0.2.0/worldbench.egg-info/PKG-INFO +438 -0
- worldbench-0.2.0/worldbench.egg-info/SOURCES.txt +46 -0
- worldbench-0.2.0/worldbench.egg-info/dependency_links.txt +1 -0
- worldbench-0.2.0/worldbench.egg-info/entry_points.txt +2 -0
- worldbench-0.2.0/worldbench.egg-info/requires.txt +21 -0
- worldbench-0.2.0/worldbench.egg-info/top_level.txt +1 -0
worldbench-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
https://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and
|
|
10
|
+
distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by the
|
|
13
|
+
copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other
|
|
16
|
+
entities that control, are controlled by, or are under common control with
|
|
17
|
+
that entity. For the purposes of this definition, "control" means (i) the
|
|
18
|
+
power, direct or indirect, to cause the direction or management of such
|
|
19
|
+
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
|
|
20
|
+
(50%) or more of the outstanding shares, or (iii) beneficial ownership of
|
|
21
|
+
such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
24
|
+
permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation source, and
|
|
28
|
+
configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical transformation or
|
|
31
|
+
translation of a Source form, including but not limited to compiled object
|
|
32
|
+
code, generated documentation, and conversions to other media types.
|
|
33
|
+
|
|
34
|
+
"Work" shall mean the work of authorship, whether in Source or Object form,
|
|
35
|
+
made available under the License, as indicated by a copyright notice that is
|
|
36
|
+
included in or attached to the work.
|
|
37
|
+
|
|
38
|
+
"Derivative Works" shall mean any work, whether in Source or Object form,
|
|
39
|
+
that is based on (or derived from) the Work and for which the editorial
|
|
40
|
+
revisions, annotations, elaborations, or other modifications represent, as a
|
|
41
|
+
whole, an original work of authorship. For the purposes of this License,
|
|
42
|
+
Derivative Works shall not include works that remain separable from, or
|
|
43
|
+
merely link (or bind by name) to the interfaces of, the Work and Derivative
|
|
44
|
+
Works thereof.
|
|
45
|
+
|
|
46
|
+
"Contribution" shall mean any work of authorship, including the original
|
|
47
|
+
version of the Work and any modifications or additions to that Work or
|
|
48
|
+
Derivative Works thereof, that is intentionally submitted to Licensor for
|
|
49
|
+
inclusion in the Work by the copyright owner or by an individual or Legal
|
|
50
|
+
Entity authorized to submit on behalf of the copyright owner. For the purposes
|
|
51
|
+
of this definition, "submitted" means any form of electronic, verbal, or
|
|
52
|
+
written communication sent to the Licensor or its representatives, including
|
|
53
|
+
but not limited to communication on electronic mailing lists, source code
|
|
54
|
+
control systems, and issue tracking systems that are managed by, or on behalf
|
|
55
|
+
of, the Licensor for the purpose of discussing and improving the Work, but
|
|
56
|
+
excluding communication that is conspicuously marked or otherwise designated
|
|
57
|
+
in writing by the copyright owner as "Not a Contribution."
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
|
60
|
+
of whom a Contribution has been received by Licensor and subsequently
|
|
61
|
+
incorporated within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this
|
|
64
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
65
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
66
|
+
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
|
67
|
+
sublicense, and distribute the Work and such Derivative Works in Source or
|
|
68
|
+
Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of this
|
|
71
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
72
|
+
non-exclusive, no-charge, royalty-free, irrevocable patent license to make,
|
|
73
|
+
have made, use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
74
|
+
where such license applies only to those patent claims licensable by such
|
|
75
|
+
Contributor that are necessarily infringed by their Contribution alone or by
|
|
76
|
+
combination of their Contribution with the Work to which such Contribution was
|
|
77
|
+
submitted. If You institute patent litigation against any entity alleging that
|
|
78
|
+
the Work or a Contribution incorporated within the Work constitutes direct or
|
|
79
|
+
contributory patent infringement, then any patent licenses granted to You
|
|
80
|
+
under this License for that Work shall terminate as of the date such
|
|
81
|
+
litigation is filed.
|
|
82
|
+
|
|
83
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or
|
|
84
|
+
Derivative Works thereof in any medium, with or without modifications, and in
|
|
85
|
+
Source or Object form, provided that You meet the following conditions:
|
|
86
|
+
|
|
87
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy
|
|
88
|
+
of this License; and
|
|
89
|
+
|
|
90
|
+
(b) You must cause any modified files to carry prominent notices stating that
|
|
91
|
+
You changed the files; and
|
|
92
|
+
|
|
93
|
+
(c) You must retain, in the Source form of any Derivative Works that You
|
|
94
|
+
distribute, all copyright, patent, trademark, and attribution notices from the
|
|
95
|
+
Source form of the Work, excluding those notices that do not pertain to any
|
|
96
|
+
part of the Derivative Works; and
|
|
97
|
+
|
|
98
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution,
|
|
99
|
+
then any Derivative Works that You distribute must include a readable copy of
|
|
100
|
+
the attribution notices contained within such NOTICE file, excluding those
|
|
101
|
+
notices that do not pertain to any part of the Derivative Works, in at least
|
|
102
|
+
one of the following places: within a NOTICE text file distributed as part of
|
|
103
|
+
the Derivative Works; within the Source form or documentation, if provided
|
|
104
|
+
along with the Derivative Works; or within a display generated by the
|
|
105
|
+
Derivative Works, if and wherever such third-party notices normally appear.
|
|
106
|
+
The contents of the NOTICE file are for informational purposes only and do not
|
|
107
|
+
modify the License. You may add Your own attribution notices within
|
|
108
|
+
Derivative Works that You distribute, alongside or as an addendum to the
|
|
109
|
+
NOTICE text from the Work, provided that such additional attribution notices
|
|
110
|
+
cannot be construed as modifying the License.
|
|
111
|
+
|
|
112
|
+
You may add Your own copyright statement to Your modifications and may provide
|
|
113
|
+
additional or different license terms and conditions for use, reproduction, or
|
|
114
|
+
distribution of Your modifications, or for any such Derivative Works as a
|
|
115
|
+
whole, provided Your use, reproduction, and distribution of the Work otherwise
|
|
116
|
+
complies with the conditions stated in this License.
|
|
117
|
+
|
|
118
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
|
119
|
+
Contribution intentionally submitted for inclusion in the Work by You to the
|
|
120
|
+
Licensor shall be under the terms and conditions of this License, without any
|
|
121
|
+
additional terms or conditions. Notwithstanding the above, nothing herein
|
|
122
|
+
shall supersede or modify the terms of any separate license agreement you may
|
|
123
|
+
have executed with Licensor regarding such Contributions.
|
|
124
|
+
|
|
125
|
+
6. Trademarks. This License does not grant permission to use the trade names,
|
|
126
|
+
trademarks, service marks, or product names of the Licensor, except as
|
|
127
|
+
required for reasonable and customary use in describing the origin of the Work
|
|
128
|
+
and reproducing the content of the NOTICE file.
|
|
129
|
+
|
|
130
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
|
|
131
|
+
writing, Licensor provides the Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
132
|
+
CONDITIONS OF ANY KIND, either express or implied, including, without
|
|
133
|
+
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
|
134
|
+
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
|
|
135
|
+
responsible for determining the appropriateness of using or redistributing
|
|
136
|
+
the Work and assume any risks associated with Your exercise of permissions
|
|
137
|
+
under this License.
|
|
138
|
+
|
|
139
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in
|
|
140
|
+
tort (including negligence), contract, or otherwise, unless required by
|
|
141
|
+
applicable law or agreed to in writing, shall any Contributor be liable to You
|
|
142
|
+
for damages, including any direct, indirect, special, incidental, or
|
|
143
|
+
consequential damages of any character arising as a result of this License or
|
|
144
|
+
out of the use or inability to use the Work, even if such Contributor has been
|
|
145
|
+
advised of the possibility of such damages.
|
|
146
|
+
|
|
147
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work
|
|
148
|
+
or Derivative Works thereof, You may choose to offer, and charge a fee for,
|
|
149
|
+
acceptance of support, warranty, indemnity, or other liability obligations
|
|
150
|
+
and/or rights consistent with this License. However, in accepting such
|
|
151
|
+
obligations, You may act only on Your own behalf and on Your sole
|
|
152
|
+
responsibility, not on behalf of any other Contributor, and only if You agree
|
|
153
|
+
to indemnify, defend, and hold each Contributor harmless for any liability
|
|
154
|
+
incurred by, or claims asserted against, such Contributor by reason of your
|
|
155
|
+
accepting any such warranty or additional liability.
|
|
156
|
+
|
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: worldbench
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Control-aware evaluation toolkit for robotics world models.
|
|
5
|
+
Author: WorldBench contributors
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Changelog, https://github.com/tigee1311/worldbench/blob/main/CHANGELOG.md
|
|
8
|
+
Project-URL: Documentation, https://github.com/tigee1311/worldbench#readme
|
|
9
|
+
Project-URL: Homepage, https://github.com/tigee1311/worldbench
|
|
10
|
+
Project-URL: Issues, https://github.com/tigee1311/worldbench/issues
|
|
11
|
+
Project-URL: Repository, https://github.com/tigee1311/worldbench
|
|
12
|
+
Keywords: robotics,world-models,evaluation,benchmarking,simulation,computer-vision
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: numpy>=1.23
|
|
28
|
+
Requires-Dist: pillow>=9.5
|
|
29
|
+
Requires-Dist: pydantic>=2.0
|
|
30
|
+
Requires-Dist: rich>=13.0
|
|
31
|
+
Requires-Dist: click>=8.0
|
|
32
|
+
Provides-Extra: vision
|
|
33
|
+
Requires-Dist: scikit-image>=0.21; extra == "vision"
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
36
|
+
Requires-Dist: ruff>=0.8; extra == "dev"
|
|
37
|
+
Requires-Dist: build>=1.5; extra == "dev"
|
|
38
|
+
Requires-Dist: twine>=6.2; extra == "dev"
|
|
39
|
+
Provides-Extra: video
|
|
40
|
+
Requires-Dist: imageio>=2.34; extra == "video"
|
|
41
|
+
Requires-Dist: imageio-ffmpeg>=0.5; extra == "video"
|
|
42
|
+
Provides-Extra: lerobot
|
|
43
|
+
Requires-Dist: lerobot>=0.4.4; extra == "lerobot"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# WorldBench Robotics
|
|
47
|
+
|
|
48
|
+
Testing and regression infrastructure for robotics world models.
|
|
49
|
+
|
|
50
|
+
Bring your own robot rollout and predicted futures. WorldBench scores the behaviors it can reliably measure, marks unsupported metrics N/A, compares runs, and saves reproducible evaluation artifacts.
|
|
51
|
+
|
|
52
|
+
WorldBench is not another world model. It is a local evaluation toolkit for checking whether generated futures are useful for robotics workflows.
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<img src="assets/demo/worldbench_demo.gif" width="850" alt="WorldBench demo showing robot world-model evaluation" />
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
## Badges
|
|
59
|
+
|
|
60
|
+

|
|
61
|
+

|
|
62
|
+

|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
## Real Model Evaluation Proof
|
|
66
|
+
|
|
67
|
+
WorldBench has been run on a real pretrained world model and a real robot rollout:
|
|
68
|
+
|
|
69
|
+
| Field | Value |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| Model | NanoWM B2 RT-1 300K |
|
|
72
|
+
| Checkpoint | `knightnemo/nanowm-b2-rt1-300k` |
|
|
73
|
+
| Data | RT-1 real robot rollout |
|
|
74
|
+
| Scope | 1 rollout |
|
|
75
|
+
| Generated future | 8 genuinely generated future frames |
|
|
76
|
+
|
|
77
|
+
| Metric | Score |
|
|
78
|
+
| --- | ---: |
|
|
79
|
+
| Overall | 92.4 |
|
|
80
|
+
| Visual Similarity | 89.2 |
|
|
81
|
+
| Temporal Stability | 96.3 |
|
|
82
|
+
| Action Consistency | N/A |
|
|
83
|
+
| Object Permanence | N/A |
|
|
84
|
+
| Contact Realism | N/A |
|
|
85
|
+
|
|
86
|
+
This is a single-rollout integration proof, not a standardized leaderboard result and not a claim that NanoWM is 92.4% accurate.
|
|
87
|
+
|
|
88
|
+
Compact artifact: [artifacts/real_model_eval/nanowm_rt1_episode0.json](artifacts/real_model_eval/nanowm_rt1_episode0.json)
|
|
89
|
+
|
|
90
|
+
More detail: [docs/real_model_evaluation.md](docs/real_model_evaluation.md)
|
|
91
|
+
|
|
92
|
+
## One Quickstart
|
|
93
|
+
|
|
94
|
+
WorldBench is installed from a source checkout today. This README does not claim a PyPI install path.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
git clone https://github.com/tigee1311/worldbench.git
|
|
98
|
+
cd worldbench
|
|
99
|
+
python3.11 -m venv .venv
|
|
100
|
+
source .venv/bin/activate
|
|
101
|
+
python -m pip install --upgrade pip
|
|
102
|
+
python -m pip install -e ".[dev,video]"
|
|
103
|
+
|
|
104
|
+
worldbench --help
|
|
105
|
+
worldbench demo
|
|
106
|
+
worldbench validate examples/demo_dataset
|
|
107
|
+
worldbench eval examples/demo_dataset --predictions examples/demo_dataset/good_model
|
|
108
|
+
worldbench report .worldbench/runs/latest/result.json
|
|
109
|
+
worldbench dashboard .worldbench/runs/latest/result.json --no-open
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The demo creates a synthetic rollout plus good and bad prediction folders. It is useful for smoke testing the CLI and reports, but the project is no longer synthetic-only.
|
|
113
|
+
|
|
114
|
+
## How WorldBench Works
|
|
115
|
+
|
|
116
|
+
WorldBench evaluates a rollout dataset against predicted future frames.
|
|
117
|
+
|
|
118
|
+
Input:
|
|
119
|
+
|
|
120
|
+
- ground-truth robot rollout frames
|
|
121
|
+
- predicted future frames
|
|
122
|
+
- action logs
|
|
123
|
+
- state logs when available
|
|
124
|
+
- episode metadata and source provenance
|
|
125
|
+
|
|
126
|
+
Output:
|
|
127
|
+
|
|
128
|
+
- per-metric scores
|
|
129
|
+
- N/A status and reasons for unsupported metrics
|
|
130
|
+
- an overall score computed across available metrics
|
|
131
|
+
- per-episode evidence and issues
|
|
132
|
+
- JSON artifacts, Markdown reports, comparison artifacts, and a local dashboard
|
|
133
|
+
|
|
134
|
+
Default metric weights:
|
|
135
|
+
|
|
136
|
+
| Metric | Weight |
|
|
137
|
+
| --- | ---: |
|
|
138
|
+
| Visual Similarity | 25 |
|
|
139
|
+
| Action Consistency | 30 |
|
|
140
|
+
| Temporal Stability | 20 |
|
|
141
|
+
| Object Permanence | 15 |
|
|
142
|
+
| Contact Realism | 10 |
|
|
143
|
+
|
|
144
|
+
Overall scores are weighted over available metrics only. In the NanoWM proof, Visual Similarity scored 89.2 with weight 25 and Temporal Stability scored 96.3 with weight 20. Action Consistency, Object Permanence, and Contact Realism were N/A, so WorldBench renormalized over the 45 available weight points:
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
(89.2 * 25 + 96.3 * 20) / 45 = 92.4 overall
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Real Data Validation
|
|
151
|
+
|
|
152
|
+
WorldBench has an opt-in integration test against a public LeRobot Yaskawa cable-untangling dataset:
|
|
153
|
+
|
|
154
|
+
| Check | Value |
|
|
155
|
+
| --- | ---: |
|
|
156
|
+
| Video timeline | 900 frames |
|
|
157
|
+
| Control timeline | 4,952 rows |
|
|
158
|
+
| Actions | 7D |
|
|
159
|
+
| States | 7D |
|
|
160
|
+
| Source video | 640x480 RGB |
|
|
161
|
+
|
|
162
|
+
The normal test suite does not download this dataset. The integration test is marked separately because it depends on Hugging Face data access.
|
|
163
|
+
|
|
164
|
+
Detailed methodology: [docs/real_data_validation.md](docs/real_data_validation.md)
|
|
165
|
+
|
|
166
|
+
## Metric Availability And N/A Behavior
|
|
167
|
+
|
|
168
|
+
WorldBench does not invent scores.
|
|
169
|
+
|
|
170
|
+
A metric returns N/A when the rollout does not provide the semantics required for reliable evaluation. Unsupported metrics are excluded from the overall score, and the remaining metric weights are renormalized.
|
|
171
|
+
|
|
172
|
+
| Metric | Available when | Returns N/A when | Notes |
|
|
173
|
+
| --- | --- | --- | --- |
|
|
174
|
+
| Visual Similarity | Ground-truth and predicted image pairs can be aligned. | It currently returns 0 with an issue if no image pairs are available. | Uses MSE, PSNR, and SSIM-style structure. Falls back to a NumPy SSIM approximation if `scikit-image` is absent. |
|
|
175
|
+
| Temporal Stability | At least two predicted frames are available. | It currently returns 0 with an issue if fewer than two predicted frames are available. | Measures frame-to-frame deltas, jumps, flicker, and variance. |
|
|
176
|
+
| Action Consistency | Actions are string commands such as `move_right`, or records provide explicit `dx` and `dy`. | Raw arbitrary numeric action vectors are present without an action adapter. | This prevents 7D robot actions from being misread as zero-motion commands. |
|
|
177
|
+
| Object Permanence | The rollout is explicitly synthetic and supports the current color/blob tracking heuristic. | Real rollouts or other data without reliable object tracking are used. | Real-world object permanence needs reliable tracking support before scoring. |
|
|
178
|
+
| Contact Realism | The rollout is explicitly synthetic and supports robot/object tracking. | Real rollouts or other data without reliable robot and object tracking are used. | Real-world contact realism needs reliable tracking support before scoring. |
|
|
179
|
+
|
|
180
|
+
Full details: [docs/metric_support.md](docs/metric_support.md)
|
|
181
|
+
|
|
182
|
+
## Native LeRobot Import
|
|
183
|
+
|
|
184
|
+
WorldBench supports native Hugging Face LeRobot datasets through the optional `lerobot` extra. LeRobot is not a mandatory base dependency.
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
python -m pip install -e ".[lerobot,video]"
|
|
188
|
+
worldbench import-lerobot \
|
|
189
|
+
--repo-id chocolat-nya/yaskawa-untangle-dataset \
|
|
190
|
+
--episodes 0:1 \
|
|
191
|
+
--camera observation.images.fixed_cam1 \
|
|
192
|
+
--timeline video \
|
|
193
|
+
--out examples/yaskawa_video
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Implemented behavior:
|
|
197
|
+
|
|
198
|
+
- `--timeline video` is the default and exports one WorldBench timestep per unique source camera frame.
|
|
199
|
+
- `--timeline control` exports one WorldBench timestep per source control row and may repeat camera frames when control runs faster than video.
|
|
200
|
+
- Video timeline action alignment uses the latest control action at or before the video timestamp.
|
|
201
|
+
- Video timeline state alignment uses the nearest source state timestamp.
|
|
202
|
+
- Control timeline action and state alignment use the source control row.
|
|
203
|
+
- Exported actions and states include source provenance fields when available: source control index/timestamp and source video frame index/timestamp.
|
|
204
|
+
- Episode metadata records source repo id, episode index, camera key, timeline, FPS, alignment strategy, source control steps, source video frame counts, and exported timestep counts.
|
|
205
|
+
- The legacy local LeRobot-style folder converter remains available through `worldbench import-lerobot <input_path> --out <output_path>` and `worldbench import-lerobot --demo --out <output_path>`.
|
|
206
|
+
|
|
207
|
+
CLI help confirms the current flags:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
worldbench import-lerobot --help
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Corruption Validation
|
|
214
|
+
|
|
215
|
+
WorldBench includes compact corruption benchmark artifacts for real Yaskawa video-timeline data. These are reproducible JSON summaries, not generated video or frame directories.
|
|
216
|
+
|
|
217
|
+
Frame-freeze benchmark: [artifacts/frame_freeze_benchmark.json](artifacts/frame_freeze_benchmark.json)
|
|
218
|
+
|
|
219
|
+
| Severity | Overall | Temporal |
|
|
220
|
+
| ---: | ---: | ---: |
|
|
221
|
+
| 0% | 99.68 | 99.28 |
|
|
222
|
+
| 5% | 99.40 | 98.66 |
|
|
223
|
+
| 15% | 99.09 | 97.97 |
|
|
224
|
+
| 30% | 98.81 | 97.36 |
|
|
225
|
+
|
|
226
|
+
Temporal-scramble benchmark: [artifacts/temporal_scramble_benchmark.json](artifacts/temporal_scramble_benchmark.json)
|
|
227
|
+
|
|
228
|
+
| Severity | Overall | Temporal |
|
|
229
|
+
| ---: | ---: | ---: |
|
|
230
|
+
| 0% | 99.68 | 99.28 |
|
|
231
|
+
| 5% | 99.64 | 99.19 |
|
|
232
|
+
| 15% | 99.58 | 99.07 |
|
|
233
|
+
| 30% | 99.51 | 98.96 |
|
|
234
|
+
|
|
235
|
+
The temporal-scramble response is currently weaker than the frame-freeze response.
|
|
236
|
+
|
|
237
|
+
## CLI
|
|
238
|
+
|
|
239
|
+
Current commands:
|
|
240
|
+
|
|
241
|
+
```text
|
|
242
|
+
worldbench benchmark Run WorldBench benchmark scenarios.
|
|
243
|
+
worldbench compare Compare result files or two model folders inside a dataset.
|
|
244
|
+
worldbench dashboard Launch a local WorldBench dashboard.
|
|
245
|
+
worldbench demo Generate a complete synthetic demo dataset and good/bad model outputs.
|
|
246
|
+
worldbench eval Run all WorldBench metrics and save result.json.
|
|
247
|
+
worldbench import-lerobot Import LeRobot data into WorldBench format.
|
|
248
|
+
worldbench init Create a sample WorldBench dataset folder structure.
|
|
249
|
+
worldbench make-demo-video Generate README demo MP4, GIF, and thumbnail assets.
|
|
250
|
+
worldbench make-screenshots Generate README dashboard and report screenshot assets.
|
|
251
|
+
worldbench report Generate a Markdown report from a result JSON file.
|
|
252
|
+
worldbench validate Validate a WorldBench dataset.
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Common command shapes:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
worldbench init <path>
|
|
259
|
+
worldbench demo [output]
|
|
260
|
+
worldbench validate <dataset_path>
|
|
261
|
+
worldbench eval <dataset_path> --predictions <predictions_path>
|
|
262
|
+
worldbench compare <dataset_path> --models good_model bad_model
|
|
263
|
+
worldbench compare <run_a/result.json> <run_b/result.json>
|
|
264
|
+
worldbench benchmark --demo
|
|
265
|
+
worldbench benchmark <benchmark_path>
|
|
266
|
+
worldbench import-lerobot --repo-id <user/dataset> --episodes 0:1 --camera <camera_key> --timeline video --out <output_path>
|
|
267
|
+
worldbench report <result_json> --output <report.md>
|
|
268
|
+
worldbench dashboard <result_json_or_dataset_path> --host 127.0.0.1 --port 8765 --no-open
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
`worldbench eval` writes timestamped results under `.worldbench/runs/` and updates `.worldbench/runs/latest/result.json`.
|
|
272
|
+
|
|
273
|
+
## Python SDK
|
|
274
|
+
|
|
275
|
+
```python
|
|
276
|
+
from worldbench import WorldBench
|
|
277
|
+
|
|
278
|
+
bench = WorldBench("examples/demo_dataset")
|
|
279
|
+
result = bench.evaluate(predictions="examples/demo_dataset/good_model")
|
|
280
|
+
print(result.score)
|
|
281
|
+
result.save_json("result.json")
|
|
282
|
+
result.save_report("report.md")
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Composable metrics:
|
|
286
|
+
|
|
287
|
+
```python
|
|
288
|
+
from worldbench import Metrics, WorldBench
|
|
289
|
+
|
|
290
|
+
bench = WorldBench("examples/demo_dataset")
|
|
291
|
+
result = bench.run(
|
|
292
|
+
metrics=[
|
|
293
|
+
Metrics.visual_similarity(),
|
|
294
|
+
Metrics.temporal_stability(),
|
|
295
|
+
Metrics.action_consistency(),
|
|
296
|
+
],
|
|
297
|
+
predictions="examples/demo_dataset/good_model",
|
|
298
|
+
)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## Dataset Format
|
|
302
|
+
|
|
303
|
+
WorldBench datasets are episode folders with frames, optional in-episode predictions, action records, state records, and metadata.
|
|
304
|
+
|
|
305
|
+
```text
|
|
306
|
+
dataset/
|
|
307
|
+
episode_001/
|
|
308
|
+
frames/
|
|
309
|
+
000001.png
|
|
310
|
+
000002.png
|
|
311
|
+
predictions/
|
|
312
|
+
000001.png
|
|
313
|
+
000002.png
|
|
314
|
+
actions.json
|
|
315
|
+
states.json
|
|
316
|
+
metadata.json
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
`actions.json` is a list of action records. Current fields include:
|
|
320
|
+
|
|
321
|
+
```json
|
|
322
|
+
{
|
|
323
|
+
"t": 0,
|
|
324
|
+
"timestamp": 0.0,
|
|
325
|
+
"source_control_index": 12,
|
|
326
|
+
"source_control_timestamp": 0.4,
|
|
327
|
+
"source_video_frame_index": 12,
|
|
328
|
+
"source_video_timestamp": 0.4,
|
|
329
|
+
"action": "move_right",
|
|
330
|
+
"dx": 1.0,
|
|
331
|
+
"dy": 0.0,
|
|
332
|
+
"gripper": "open"
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
`states.json` is a list of state records. Current fields include:
|
|
337
|
+
|
|
338
|
+
```json
|
|
339
|
+
{
|
|
340
|
+
"t": 0,
|
|
341
|
+
"timestamp": 0.0,
|
|
342
|
+
"source_control_index": 12,
|
|
343
|
+
"source_control_timestamp": 0.4,
|
|
344
|
+
"source_video_frame_index": 12,
|
|
345
|
+
"source_video_timestamp": 0.4,
|
|
346
|
+
"observation_state": [0.0, 0.1],
|
|
347
|
+
"robot_x": 20,
|
|
348
|
+
"robot_y": 50,
|
|
349
|
+
"object_x": 80,
|
|
350
|
+
"object_y": 50
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
`metadata.json` records episode-level information such as `name`, `robot`, `task`, `fps`, `description`, and LeRobot provenance fields when imported from LeRobot.
|
|
355
|
+
|
|
356
|
+
The result schema is represented by `EvaluationResult`:
|
|
357
|
+
|
|
358
|
+
- `dataset_path`
|
|
359
|
+
- `predictions_path`
|
|
360
|
+
- `created_at`
|
|
361
|
+
- `score`
|
|
362
|
+
- `metrics`
|
|
363
|
+
- `episodes`
|
|
364
|
+
- `weights`
|
|
365
|
+
- `issues`
|
|
366
|
+
- `main_failure`
|
|
367
|
+
|
|
368
|
+
Each metric result contains `name`, `score`, `status`, `reason`, `details`, and `issues`.
|
|
369
|
+
|
|
370
|
+
## Current Limitations
|
|
371
|
+
|
|
372
|
+
- The NanoWM proof is one real-model rollout so far.
|
|
373
|
+
- The NanoWM proof evaluates eight generated future frames.
|
|
374
|
+
- The NanoWM score is not a standardized leaderboard result.
|
|
375
|
+
- Arbitrary numeric action vectors require explicit action adapters before action consistency can be scored.
|
|
376
|
+
- Real-world object permanence requires reliable object tracking support.
|
|
377
|
+
- Real-world contact realism requires reliable robot and object tracking support.
|
|
378
|
+
- Temporal scrambling currently produces a weaker score response than frame freezing.
|
|
379
|
+
- Normal CI does not download large LeRobot datasets or rerun expensive model inference.
|
|
380
|
+
|
|
381
|
+
## Roadmap
|
|
382
|
+
|
|
383
|
+
Working now:
|
|
384
|
+
|
|
385
|
+
- synthetic demo
|
|
386
|
+
- external prediction evaluation
|
|
387
|
+
- native LeRobot import
|
|
388
|
+
- video/control timelines
|
|
389
|
+
- real robot rollout evaluation
|
|
390
|
+
- model comparison
|
|
391
|
+
- unavailable-metric handling
|
|
392
|
+
- corruption validation
|
|
393
|
+
- real NanoWM evaluation
|
|
394
|
+
- reports
|
|
395
|
+
- dashboard
|
|
396
|
+
|
|
397
|
+
Next:
|
|
398
|
+
|
|
399
|
+
- direct video-pair evaluation
|
|
400
|
+
- multi-episode aggregation
|
|
401
|
+
- per-horizon curves
|
|
402
|
+
- regression gate
|
|
403
|
+
- explicit action-adapter registry
|
|
404
|
+
- second real world model
|
|
405
|
+
- external users
|
|
406
|
+
|
|
407
|
+
Later:
|
|
408
|
+
|
|
409
|
+
- ManiSkill/RLBench
|
|
410
|
+
- ROS bags
|
|
411
|
+
- shared run reports
|
|
412
|
+
- standardized leaderboard
|
|
413
|
+
|
|
414
|
+
Full roadmap: [docs/ROADMAP.md](docs/ROADMAP.md)
|
|
415
|
+
|
|
416
|
+
## Contributing
|
|
417
|
+
|
|
418
|
+
WorldBench is intentionally small and inspectable. Useful contributions include:
|
|
419
|
+
|
|
420
|
+
- action adapters for real robot action spaces
|
|
421
|
+
- tracking adapters for real-world object/contact metrics
|
|
422
|
+
- additional compact real-model artifacts
|
|
423
|
+
- offline tests for importer and metric edge cases
|
|
424
|
+
- report and dashboard polish
|
|
425
|
+
|
|
426
|
+
Before opening a PR:
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
python -m pip install -e ".[dev]"
|
|
430
|
+
ruff check .
|
|
431
|
+
pytest
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
Keep large generated media, extracted frame folders, temporary datasets, and model prediction directories out of commits.
|
|
435
|
+
|
|
436
|
+
## License
|
|
437
|
+
|
|
438
|
+
Apache-2.0. See [LICENSE](LICENSE).
|