feat(task): support seconds-based task horizons resolved against control rate (#160)#162
Open
Adityakk9031 wants to merge 1 commit into
Open
feat(task): support seconds-based task horizons resolved against control rate (#160)#162Adityakk9031 wants to merge 1 commit into
Adityakk9031 wants to merge 1 commit into
Conversation
Contributor
Author
|
@jeqcho have a look |
Adityakk9031
force-pushed
the
#160
branch
2 times, most recently
from
July 22, 2026 19:48
5b21a7b to
10ebd03
Compare
Contributor
Author
|
@jeqcho all check pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #160 (and #161).
Task.max_stepswas previously a fixed integer step budget set at task construction time. However, benchmark tasks defined in physical time (e.g. KitchenBench) allot per-task seconds (max_seconds). Because task factories behind string registries are zero-arg andTaskis embodiment-agnostic, tasks had no way to resolve physical durations into step counts prior to pairing with an embodiment.This PR adds support for declaring task horizons in physical seconds (
Task(max_seconds=...)), whicheval()resolves into integer step budgets (max_steps = math.ceil(max_seconds * control_hz)) after pairing with an embodiment.Key Changes
inspect_robots.task.Task: Mademax_steps: int | None = Noneoptional and addedmax_seconds: float | None = None. Added__post_init__validation enforcing mutual exclusion (exactly one ofmax_stepsormax_secondsmust be set) and positive numeric ranges.task.enveloperaisesConfigErrorif called on an unresolvedmax_secondstask.inspect_robots.compat: Added a preflight compatibility check (control_hz_missingerror issue) ensuringembodiment.info.control_hzis present andtask.max_secondsis specified.inspect_robots.eval: Computesmax_steps = math.ceil(task.max_seconds * control_hz)ateval()time, passing the resolved integer budget tobind_taskhooks androllout().inspect_robots.log: Addedmax_seconds: float | None = NonetoEvalSpecfor reproducible log schema persistence.tests/test_task_horizon.py: Added unit tests covering task horizon validation, preflightcontrol_hzcompatibility checks, fractionalmath.ceilresolution, andEvalLogpersistence.Verification
pytest --cov). All 716 tests passed.ruff check .,ruff format --check ., andmypy.