What are Subtasks?
While a task describes the overall goal (e.g., “Pick up the apple and place it in the basket”), subtasks break execution into atomic steps:- “Approach the apple”
- “Grasp the apple”
- “Lift the apple”
- “Move to basket”
- “Release the apple”
Dataset Structure
Subtask information is stored inmeta/subtasks.parquet:
Subtasks File Format
meta/subtasks.parquet maps indices to descriptions:
| subtask_index | subtask (index column) |
|---|---|
| 0 | ”Approach the apple” |
| 1 | ”Grasp the apple” |
| 2 | ”Lift the apple” |
| 3 | ”Move to basket” |
| 4 | ”Release the apple” |
Frame-Level Annotations
Each frame includes asubtask_index field:
Annotating Datasets
Use the Hugging Face Space to annotate datasets: https://huggingface.co/spaces/lerobot/annotateSteps:
- Load your dataset
- Define subtask labels
- Annotate frame ranges for each episode
- Push annotated dataset to Hub
Loading Datasets with Subtasks
Accessing Subtask Information
Using with DataLoader
Training with Subtasks
Hierarchical Policy
Predict both actions and current subtask:Stage-Aware Reward Modeling (SARM)
Build reward models that understand task progression:Subtask Analysis
Distribution Analysis
Episode-Level Analysis
Progress Visualization
Monitor robot execution by tracking subtask progression:Subtask-Conditioned Policies
Use ground truth or predicted subtasks as input:Example Datasets
Datasets with subtask annotations:API Reference
Dataset Properties
| Property | Type | Description |
|---|---|---|
dataset.meta.subtasks | pd.DataFrame | None | Subtask index to name mapping |
dataset.features["subtask_index"] | dict | Feature spec if subtasks present |
Sample Keys
| Key | Type | Description |
|---|---|---|
subtask_index | torch.Tensor | Integer subtask index |
subtask | str | Natural language subtask description |
Related Resources
- SARM Paper - Stage-Aware Reward Modeling
- LeRobot Annotate Space - Annotation tool
- Dataset Overview - Dataset format documentation