Skip to main content
Subtask annotations break down complex manipulation tasks into interpretable, fine-grained steps. They’re useful for hierarchical policies, reward modeling, and understanding robot behavior.

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:
  1. “Approach the apple”
  2. “Grasp the apple”
  3. “Lift the apple”
  4. “Move to basket”
  5. “Release the apple”
Each frame can be annotated with its corresponding subtask, enabling models to learn intermediate stages.

Dataset Structure

Subtask information is stored in meta/subtasks.parquet:

Subtasks File Format

meta/subtasks.parquet maps indices to descriptions:

Frame-Level Annotations

Each frame includes a subtask_index field:

Annotating Datasets

Use the Hugging Face Space to annotate datasets: https://huggingface.co/spaces/lerobot/annotate

Steps:

  1. Load your dataset
  2. Define subtask labels
  3. Annotate frame ranges for each episode
  4. Push annotated dataset to Hub
You can also run the annotator locally: github.com/huggingface/lerobot-annotate

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

Sample Keys