mirror of
https://github.com/huggingface/lerobot.git
synced 2026-08-08 17:39:44 +00:00
docs(rollout): write the API reference docstrings
Wave 4 (training & eval) kickoff: brings src/lerobot/rollout/ to 100% public docstring coverage, following the standard in docs/source/writing_docstrings.mdx. Picked as the smallest of the five Wave 4 modules (scripts/envs/rewards/rl/rollout) to validate the workflow before the larger ones. - Documents the remaining gaps across configs.py (RolloutConfig, the RolloutStrategyConfig hierarchy, DAggerKeyboardConfig/DAggerPedalConfig), inference/ (InferenceEngineConfig hierarchy, RTCInferenceEngine.__init__, SyncInferenceEngine.__init__), ring_buffer.py, robot_wrapper.py, and every strategy's __init__ (core/dagger/episodic/highlight/sentry), converting RolloutConfig's and the strategy configs' inline `#` field comments into type-annotated Args: blocks and RolloutRingBuffer's numpydoc Parameters section into Google-style Args:. - Also documents two dunder methods (RolloutConfig.__get_path_fields__, RolloutRingBuffer.__len__) that a naive "skip all underscore-prefixed names" gap scan misses but interrogate's ignore-magic=false requires. - Removes "src/lerobot/rollout/**" = ["D"] from pyproject.toml's ruff ignore list — the whole module is now checked, no deferred internals (unlike the policies module, rollout has no per-family split to narrow the scope of). - Adds lerobot.rollout to check_docstrings.py's MODULES_TO_CHECK ratchet. - Creates docs/source/api/rollout.mdx from scratch (strategies, inference backends, RolloutContext and its sub-contexts, ThreadSafeRobot, RolloutRingBuffer) and wires it into _toctree.yml under API Reference. Verified via a full doc-builder build — no dead cross-references, no leftover placeholder text. - Ratchets interrogate's fail-under from 55 to 55.5 (measured 55.6% with this PR). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -215,4 +215,6 @@
|
||||
title: Environments
|
||||
- local: api/configs
|
||||
title: Configuration
|
||||
- local: api/rollout
|
||||
title: Rollout
|
||||
title: "API Reference"
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
# Rollout
|
||||
|
||||
`lerobot.rollout` is the policy deployment engine behind [`lerobot-rollout`](../inference): it wires up a
|
||||
policy, an inference backend, and a pluggable recording strategy, then runs the robot control loop. See
|
||||
[Policy Deployment (lerobot-rollout)](../inference) for CLI usage and [Real-Time Chunking (RTC)](../rtc)
|
||||
for the async inference backend.
|
||||
|
||||
## RolloutConfig
|
||||
|
||||
Top-level configuration for the `lerobot-rollout` CLI.
|
||||
|
||||
[[autodoc]] lerobot.rollout.RolloutConfig
|
||||
|
||||
## Strategies
|
||||
|
||||
Strategies implement the control loop and are selected via `--strategy.type=<name>`.
|
||||
|
||||
[[autodoc]] lerobot.rollout.RolloutStrategy
|
||||
- setup
|
||||
- run
|
||||
- teardown
|
||||
|
||||
[[autodoc]] lerobot.rollout.RolloutStrategyConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.BaseStrategy
|
||||
- all
|
||||
|
||||
[[autodoc]] lerobot.rollout.BaseStrategyConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.SentryStrategy
|
||||
- all
|
||||
|
||||
[[autodoc]] lerobot.rollout.SentryStrategyConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.HighlightStrategy
|
||||
- all
|
||||
|
||||
[[autodoc]] lerobot.rollout.HighlightStrategyConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.EpisodicStrategy
|
||||
- all
|
||||
|
||||
[[autodoc]] lerobot.rollout.EpisodicStrategyConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.DAggerStrategy
|
||||
- all
|
||||
|
||||
[[autodoc]] lerobot.rollout.DAggerStrategyConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.DAggerKeyboardConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.DAggerPedalConfig
|
||||
|
||||
## create_strategy
|
||||
|
||||
[[autodoc]] lerobot.rollout.create_strategy
|
||||
|
||||
## Inference backends
|
||||
|
||||
Inference backends produce actions during the control loop and are selected via
|
||||
`--inference.type=<name>`.
|
||||
|
||||
[[autodoc]] lerobot.rollout.InferenceEngine
|
||||
- start
|
||||
- stop
|
||||
- reset
|
||||
- get_action
|
||||
- notify_observation
|
||||
- pause
|
||||
- resume
|
||||
|
||||
[[autodoc]] lerobot.rollout.InferenceEngineConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.SyncInferenceEngine
|
||||
- all
|
||||
|
||||
[[autodoc]] lerobot.rollout.SyncInferenceConfig
|
||||
|
||||
[[autodoc]] lerobot.rollout.RTCInferenceEngine
|
||||
- all
|
||||
|
||||
[[autodoc]] lerobot.rollout.RTCInferenceConfig
|
||||
|
||||
## create_inference_engine
|
||||
|
||||
[[autodoc]] lerobot.rollout.create_inference_engine
|
||||
|
||||
## build_rollout_context
|
||||
|
||||
Wires up policy, processors, hardware, dataset, and inference engine before strategy dispatch.
|
||||
|
||||
[[autodoc]] lerobot.rollout.build_rollout_context
|
||||
|
||||
## RolloutContext
|
||||
|
||||
[[autodoc]] lerobot.rollout.RolloutContext
|
||||
|
||||
[[autodoc]] lerobot.rollout.RuntimeContext
|
||||
|
||||
[[autodoc]] lerobot.rollout.HardwareContext
|
||||
|
||||
[[autodoc]] lerobot.rollout.PolicyContext
|
||||
|
||||
[[autodoc]] lerobot.rollout.ProcessorContext
|
||||
|
||||
[[autodoc]] lerobot.rollout.DatasetContext
|
||||
|
||||
## ThreadSafeRobot
|
||||
|
||||
[[autodoc]] lerobot.rollout.robot_wrapper.ThreadSafeRobot
|
||||
- all
|
||||
|
||||
## RolloutRingBuffer
|
||||
|
||||
Memory-bounded ring buffer used by the Highlight strategy for on-demand recording.
|
||||
|
||||
[[autodoc]] lerobot.rollout.ring_buffer.RolloutRingBuffer
|
||||
- all
|
||||
Reference in New Issue
Block a user