-
Notifications
You must be signed in to change notification settings - Fork 63
feat(robot,eval): unified robot stack + Shared runtime for concurrent rollouts #481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lukass16
wants to merge
56
commits into
main
Choose a base branch
from
lukass/phys-experimental
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
3966c31
wip: save robot agent/recorder/bridge state before vectorized taskset…
lukass16 ebd1cbe
refactor(robot): serve every sim with one process shape (SimThread)
lukass16 0321435
refactor(telemetry): extract shared robot recording into hud.telemetr…
lukass16 ed4cb29
refactor(robot): batched-first RobotBridge with slots grading; add Gy…
lukass16 37826e4
feat(robot): declarative gym envs (env.gym) and hud.wrap trace streaming
lukass16 0f84f9c
refactor(agents): unify RobotAgent to drive N>=1 env slots
lukass16 8b27cae
feat(eval): grouped rollouts via rollout_group and Taskset.run(num_en…
lukass16 9e222ff
docs(robots): update for the unified robot stack
lukass16 47264de
feat(agents): size BatchedModel to the live concurrency by default
lukass16 4d05aae
refactor(eval): rename rollout_group to vec_rollout
lukass16 d4f7efa
fix(agents): satisfy strict pyright in the robot agent stack
lukass16 2fe6bfd
fix(agents): make DatasetWriter work with derived contracts
lukass16 923e546
fix(agents): stop recording inference for finished env slots
lukass16 7710838
docs(robots): run parameters table; batching and vec_rollout updates
lukass16 a622ba5
feat(environment): serve concurrent control sessions
jdchawla29 e353e12
merge: bring in concurrent control sessions (a622ba5)
lukass16 0faf857
refactor(agents): drop per-agent max_steps override on RobotAgent
lukass16 6e4a811
refactor(robot): spawn every sim as its own fork-free process; declar…
lukass16 748ed4c
feat(eval): add Run.started carrying the full tasks.start reply
lukass16 b5258cd
feat(environment/robot): lock RobotEndpoint; reset/result carry a token
lukass16 fded695
feat(environment/robot): slot registry + barrier stepping in the bridge
lukass16 2c698d4
feat(capabilities/robot): RobotClient.connect claims a slot by token
lukass16 278376f
refactor(agents/robot): drop drive() for a single scalar rollout loop
lukass16 880b902
refactor(eval): drop vec_rollout/num_envs; add Shared provider
lukass16 aef1196
docs(robots): document sessions-based vectorized evals and Shared
lukass16 121d945
docs(agents): tighten BatchedModel and BatchedAgent docstrings
lukass16 8b42d5e
feat(agents): share one LeRobot dataset across concurrent rollouts
lukass16 b521d96
docs(robot): tighten RobotClient and Environment.gym docstrings
lukass16 42f6e28
refactor(environment/robot): fold SimThread into bridge; move GymBrid…
lukass16 d1d7e23
refactor(hud): drop lazy hud.wrap export from package root
lukass16 1df6832
docs(robot): point wrap at hud.environment.robot, not hud.wrap
lukass16 08d424e
docs(environment/robot): shorten the bridge module docstring
lukass16 0a2d2cf
fix(environment/robot): barrier over all claimed slots, not just conn…
lukass16 9884ccc
docs(agents/robot): clarify max_steps is a call-site kwarg with defau…
lukass16 9f0cc5a
fix(robot): fail fast when the slot claim is missing instead of deadl…
lukass16 5ae0641
fix(environment/robot): reject mismatched claim kwargs; fix hold shap…
lukass16 9e1df70
fix(agents/robot): honor subclass max_steps and skip acting when alre…
lukass16 083122f
fix(robot): barrier, claim, telemetry, and gym-argv robustness from r…
lukass16 e878d30
feat(robot): make the slot token optional for single-env bridges
lukass16 cc47fff
feat(environment/robot): lazy Isaac spawn — serve the wire before the…
lukass16 16104f3
fix(environment/robot): probe env at start when contract.json is missing
lukass16 21efad7
docs(robots): split env-side docs into gym-style envs and custom bridges
lukass16 37dc2ab
docs(robots): rewrite vectorized envs and evals section
lukass16 bb698af
docs(robots): simplify overview and recording notes, drop sim internals
lukass16 9c22754
fix(environment/robot): barrier holds, lazy contract, sim-thread reset
lukass16 23cf01a
fix(agents/robot): serialize DatasetWriter commits; label action plots
lukass16 92ab505
docs(robots): omit slot token in the single-env cookbook template
lukass16 f097fc4
fix(eval): seal Shared provision leaks and enforce width
lukass16 6ac7303
revert(cli): keep hud serve on asyncio.run(serve)
lukass16 708734f
chore(tests): drop robot/gym bridge unit tests from the PR
lukass16 0ff5bbc
chore(tests): drop Shared provider unit tests from the PR
lukass16 5b2bb53
fix(robot): clear ruff and pyright failures on the branch
lukass16 a43fec0
feat(environment/robot): RobotEndpoint spawns custom bridges on start
lukass16 394f162
fix(robot): forward bridge ctor kwargs; open DatasetWriter on first f…
lukass16 49f150a
fix(environment/robot): read episode grades on the sim thread
lukass16 5928734
feat(agents/robot): honor Adapter.chunk_size as open-loop horizon
lukass16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,7 @@ | |
| "instrument", | ||
| ] | ||
|
|
||
|
|
||
| try: | ||
| from .version import __version__ | ||
| except ImportError: | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,39 @@ | ||
| """Robot agent harness: drive a ``robot`` capability with a policy. | ||
|
|
||
| The harness splits a policy rollout into three seams, each replaceable on its own: | ||
|
|
||
| - :class:`~hud.agents.robot.agent.RobotAgent` — the loop: connect to the env's | ||
| ``robot`` capability, observe, act, stop. | ||
| - :class:`~hud.agents.robot.model.Model` — *how to run* the policy (preprocess → | ||
| forward → postprocess). :class:`~hud.agents.robot.model.LeRobotModel` ships the | ||
| LeRobot checkpoint convention. | ||
| - :class:`~hud.agents.robot.adapter.Adapter` — translate between the env's | ||
| observation/action spaces (from the contract) and the policy's. | ||
|
|
||
| Wrap an agent in :class:`~hud.agents.robot.batching.BatchedAgent` to run many rollouts | ||
| concurrently off one batched GPU forward (``max_concurrent`` rollouts, shared model). | ||
|
|
||
| Per-tick platform tracing is emitted by the loop itself: each step records an | ||
| :class:`~hud.agents.types.ObservationStep`, and each re-inference an | ||
| :class:`~hud.agents.types.InferenceStep`, so runs stream live into the HUD trace viewer. | ||
|
|
||
| This subpackage needs the ``robot`` extra (``pip install 'hud[robot]'``) for | ||
| ``numpy`` + ``msgpack``; importing :mod:`hud.agents` alone never pulls them in. | ||
| """Agent-side robot harness: drive a ``robot`` env with a VLA policy. | ||
|
|
||
| - :class:`~.agent.RobotAgent` — the harness: connects to the ``robot`` | ||
| capability (claiming a slot token from ``run.started``), reads the contract, | ||
| drives one scalar connection with an open-loop chunk queue. Subclass and | ||
| set ``self.model`` + ``self.adapter``. | ||
| - :class:`~.model.Model` / :class:`~.model.LeRobotModel` / | ||
| :class:`~.model.RemoteModel` — the policy and its inference mechanics. | ||
| - :class:`~.adapter.Adapter` / :class:`~.adapter.LeRobotAdapter` / | ||
| :class:`~.adapter.OpenPIAdapter` — env <-> policy space translation. | ||
| - :class:`~.batching.BatchedAgent` — many concurrent single-env rollouts | ||
| sharing one batched model. | ||
| - :class:`~.dataset.DatasetWriter` — opt-in LeRobot v3 dataset recording | ||
| (``agent.save = True``). | ||
|
|
||
| This subpackage needs the ``robot`` extra (``pip install 'hud[robot]'``). | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from .adapter import Adapter, LeRobotAdapter, OpenPIAdapter | ||
| from .agent import ROBOT_PROTOCOL, RobotAgent | ||
| from .batching import BatchedAgent, BatchedModel | ||
| from .model import LeRobotModel, Model | ||
| from .dataset import DatasetWriter | ||
| from .model import LeRobotModel, Model, RemoteModel | ||
|
|
||
| __all__ = [ | ||
| "ROBOT_PROTOCOL", | ||
| "Adapter", | ||
| "BatchedAgent", | ||
| "BatchedModel", | ||
| "DatasetWriter", | ||
| "LeRobotAdapter", | ||
| "LeRobotModel", | ||
| "Model", | ||
| "OpenPIAdapter", | ||
| "RemoteModel", | ||
| "RobotAgent", | ||
| ] |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.