kitchenbench 0.3.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.
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: ci-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ quality:
15
+ name: lint · type
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v5
21
+ with:
22
+ enable-cache: true
23
+ cache-dependency-glob: "**/pyproject.toml"
24
+ - name: Create venv
25
+ run: uv venv --python 3.11
26
+ - name: Install (dev extras; inspect_robots from git via tool.uv.sources)
27
+ run: uv pip install -e ".[dev]"
28
+ - name: Ruff (lint)
29
+ run: uv run ruff check .
30
+ - name: Ruff (format check)
31
+ run: uv run ruff format --check .
32
+ - name: Mypy (strict)
33
+ run: uv run mypy
34
+
35
+ test:
36
+ name: test (${{ matrix.os }}, py${{ matrix.python-version }})
37
+ runs-on: ${{ matrix.os }}
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ os: [ubuntu-latest, macos-latest]
42
+ python-version: ["3.11", "3.12"]
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+ - name: Install uv
46
+ uses: astral-sh/setup-uv@v5
47
+ with:
48
+ enable-cache: true
49
+ cache-dependency-glob: "**/pyproject.toml"
50
+ - name: Create venv (py${{ matrix.python-version }})
51
+ run: uv venv --python ${{ matrix.python-version }}
52
+ - name: Install (dev extras)
53
+ run: uv pip install -e ".[dev]"
54
+ - name: Pytest (100% coverage gate)
55
+ run: uv run pytest --cov --cov-report=term-missing
@@ -0,0 +1,23 @@
1
+ name: Release
2
+
3
+ # Publishes to PyPI via trusted publishing (OIDC) — no API tokens.
4
+ # Authenticates against the PyPI trusted-publisher entry for this repo
5
+ # (workflow: release.yml, environment: pypi).
6
+ on:
7
+ release:
8
+ types: [published]
9
+
10
+ jobs:
11
+ publish:
12
+ runs-on: ubuntu-latest
13
+ environment: pypi
14
+ permissions:
15
+ id-token: write # OIDC token for PyPI trusted publishing
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v5
20
+ - name: Build sdist + wheel
21
+ run: uv build
22
+ - name: Publish to PyPI
23
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,224 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ # .vscode/
203
+ # Temporary file for partial code execution
204
+ tempCodeRunnerFile.py
205
+
206
+ # Ruff stuff:
207
+ .ruff_cache/
208
+
209
+ # PyPI configuration file
210
+ .pypirc
211
+
212
+ # Marimo
213
+ marimo/_static/
214
+ marimo/_lsp/
215
+ __marimo__/
216
+
217
+ # Streamlit
218
+ .streamlit/secrets.toml
219
+
220
+ # uv lockfile (this is a library; CI resolves from pyproject)
221
+ uv.lock
222
+
223
+ # Local read-only copy of the methodology reference (not part of the package)
224
+ reference/
@@ -0,0 +1,57 @@
1
+ # Pre-commit hooks for KitchenBench. Install once per clone:
2
+ #
3
+ # uv run pre-commit install # sets up both pre-commit and pre-push hooks
4
+ #
5
+ # On commit: file hygiene + ruff (lint & format) + mypy (strict).
6
+ # On push: pytest with the 100% coverage gate.
7
+ #
8
+ # Run everything manually with: uv run pre-commit run --all-files
9
+ #
10
+ # The ruff / mypy / pytest hooks are "local" so they use the exact versions
11
+ # pinned in this project's dev environment (matching CI) rather than a separate
12
+ # pinned copy.
13
+ default_install_hook_types: [pre-commit, pre-push]
14
+
15
+ repos:
16
+ - repo: https://github.com/pre-commit/pre-commit-hooks
17
+ rev: v5.0.0
18
+ hooks:
19
+ - id: trailing-whitespace
20
+ - id: end-of-file-fixer
21
+ - id: check-yaml
22
+ - id: check-toml
23
+ - id: check-merge-conflict
24
+ - id: check-added-large-files
25
+
26
+ # Local hooks run through `uv run` so they use this project's dev environment
27
+ # (matching CI) regardless of whether a virtualenv is activated. Requires uv.
28
+ - repo: local
29
+ hooks:
30
+ - id: ruff-check
31
+ name: ruff (lint, autofix)
32
+ entry: uv run ruff check --fix
33
+ language: system
34
+ types_or: [python, pyi]
35
+ require_serial: true
36
+
37
+ - id: ruff-format
38
+ name: ruff (format)
39
+ entry: uv run ruff format
40
+ language: system
41
+ types_or: [python, pyi]
42
+ require_serial: true
43
+
44
+ - id: mypy
45
+ name: mypy (strict)
46
+ entry: uv run mypy
47
+ language: system
48
+ types: [python]
49
+ pass_filenames: false
50
+
51
+ - id: pytest-coverage
52
+ name: pytest (100% coverage gate)
53
+ entry: uv run pytest --cov --cov-report=term-missing
54
+ language: system
55
+ always_run: true # run on every push, even when no .py files changed
56
+ pass_filenames: false
57
+ stages: [pre-push]
@@ -0,0 +1,9 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ title: "KitchenBench: A bimanual kitchen-manipulation benchmark for VLA models"
4
+ authors:
5
+ - name: "Robocurve"
6
+ type: software
7
+ license: MIT
8
+ repository-code: "https://github.com/robocurve/kitchenbench"
9
+ version: "0.3.0"
@@ -0,0 +1,68 @@
1
+ # KitchenBench — agent guide
2
+
3
+ KitchenBench is a **standalone benchmark repo**: 10 bimanual kitchen-manipulation
4
+ tasks for VLA models, expressed as [Inspect Robots](https://github.com/robocurve/inspect-robots)
5
+ `Task`s. It is the first member of
6
+ [WorldEvals](https://github.com/robocurve/worldevals) (the "Inspect Evals for
7
+ robotics"). It is a **Inspect Robots plugin** — it depends on Inspect Robots, defines tasks,
8
+ and registers them via entry points.
9
+
10
+ ## The one big idea
11
+
12
+ A benchmark is **embodiment-agnostic**: it defines *what* to evaluate (scenes +
13
+ scorers), never *how* the robot is built. The same 10 tasks run against the
14
+ dependency-free mock kitchen (for CI) and against real **YAM bimanual arms +
15
+ MolmoAct2** — only the `Policy`/`Embodiment` change.
16
+
17
+ Each task is a set of **task instances** (the
18
+ [physical-automation methodology](https://github.com/jeqcho/physical-automation-methodology-docs),
19
+ cloned read-only into `reference/`, gitignored). A task instance is a *stochastic
20
+ environment spec* (named random variables + **distributions**) + a goal. Defaults
21
+ follow the methodology: **5 instances per task** (one `Scene` each) × **5
22
+ realizations per instance** (`Epochs(count=5, reducer="mean")`) = 50 scenes. The
23
+ mean over 5 realizations makes each scene's reduced `task_success` the instance
24
+ success probability **P̂[Yᵢ=1]**. Instances are AI-authored drafts
25
+ (`Validation(source="opus-draft")`, `validated=False`) — not yet human-validated.
26
+
27
+ ## Layout
28
+
29
+ - `src/kitchenbench/` — the package (see `src/kitchenbench/CLAUDE.md` for the
30
+ module map and how to add a task).
31
+ - `tests/` — pytest; the mock `KitchenEmbodiment` + scripted policy exercise the
32
+ whole stack with no hardware.
33
+ - `plans/0002-task-instances-distributions.md` — the design doc for the
34
+ task-instance/distribution model (read before changing the task set, the
35
+ distributions, or the 5×5 defaults).
36
+ - `reference/` — read-only local copy of the methodology PDFs (gitignored).
37
+ - `README.md` — the task table + how to run on the mock and on YAM/MolmoAct2.
38
+
39
+ ## Working here (important gotchas)
40
+
41
+ - **Dependency on Inspect Robots is a git tag.** `pyproject.toml` declares
42
+ `inspect-robots>=0.3` with `[tool.uv.sources] inspect-robots = { git = ..., tag = "v0.3.0" }`.
43
+ CI uses `uv` (plain pip ignores `tool.uv.sources`). A sibling checkout exists at
44
+ `../inspect-robots`; for local dev against it, override with
45
+ `uv pip install -e ../inspect-robots`.
46
+ - **Conda is active in this shell.** `uv pip install` targets the *active* env, so
47
+ a bare `uv pip install -e .` lands in conda base, not `.venv`. Always
48
+ `source .venv/bin/activate && export VIRTUAL_ENV="$PWD/.venv"` first (or use
49
+ `uv run`).
50
+ - Dev loop: `uv venv && uv pip install -e ".[dev]"`, `uv run pre-commit install`,
51
+ `uv run pytest --cov`.
52
+ - **Gates (all must pass):** `ruff check .`, `ruff format --check .`, `mypy`
53
+ (strict), `pytest --cov` at **100% coverage**. Pre-commit runs ruff+mypy on
54
+ commit and the coverage gate on push (via `uv run`). CI (Linux+macOS ×
55
+ py3.11/3.12) and the 100% gate are **required, blocking PR checks**.
56
+ - **Authoring imports come from the top-level `inspect_robots` package** (its public
57
+ API, stable as of v0.3.0): `from inspect_robots import Task, Scene, Target, task,
58
+ ActionChunk, ...`. Don't import from `inspect_robots.<submodule>` unless a symbol
59
+ isn't re-exported (capability flags like `SEEDABLE` live in
60
+ `inspect_robots.embodiment`).
61
+
62
+ ## Out of scope (lives elsewhere)
63
+
64
+ The real YAM-arms `Embodiment` and the MolmoAct2 `Policy` are *adapters* and live
65
+ in their own package (e.g. `robocurve/embodiments`), not here. KitchenBench ships
66
+ only the tasks + a mock world. See the README's "Run it on real hardware" section
67
+ for the contract those adapters must implement (operator-confirmed success →
68
+ `termination_reason="success"`; declare `"self_paced"` and pace `step()`).
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 robocurve
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.