Repository navigation
feat(policy): add replaceable action-chunk inference API - #3
Merged
Merged
Conversation
Add a typed Policy.infer interface and HTTP service for task text, timestamped observations and history to decoded Microduck joint action chunks. FakePolicy and HttpPolicy share the interface, allowing a learned backend to replace rules without changing robotd. The runner consumes latest robot.state feedback, trims expired predictions without rebasing timestamps, and submits through the existing robotd Action Session. It releases ownership on completion or failure and cannot reacquire control after an external stop. Add interface documentation, runnable examples and CI coverage. Validation: make fix and make lint passed (Ruff formatting/lint and strict mypy). On Debian devbox, robotd built from this checkout with Rust 1.99; all 14 Python tests passed, including four real HTTP/Unix IPC/robotd/FakeIo tests for measured head motion, replacement, stop during inference, errors and timeout cleanup. git diff --check passed. Scope: FakeIo execution is verified. Camera acquisition, trained VLA integration, MuJoCo balance and physical robot operation are not implemented or validated by this change; the existing fake/sim-only action admission remains unchanged.
Coverage73.16% lines on this branch, against a floor of 70%. Per-file |
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.
Add a typed Policy.infer interface and HTTP service for task text, timestamped observations and history to decoded Microduck joint action chunks. FakePolicy and HttpPolicy share the interface, allowing a learned backend to replace rules without changing robotd.
The runner consumes latest robot.state feedback, trims expired predictions without rebasing timestamps, and submits through the existing robotd Action Session. It releases ownership on completion or failure and cannot reacquire control after an external stop. Add interface documentation, runnable examples and CI coverage.
Validation: make fix and make lint passed (Ruff formatting/lint and strict mypy). On Debian devbox, robotd built from this checkout with Rust 1.99; all 14 Python tests passed, including four real HTTP/Unix IPC/robotd/FakeIo tests for measured head motion, replacement, stop during inference, errors and timeout cleanup. git diff --check passed.
Scope: FakeIo execution is verified. Camera acquisition, trained VLA integration, MuJoCo balance and physical robot operation are not implemented or validated by this change; the existing fake/sim-only action admission remains unchanged.