-
Notifications
You must be signed in to change notification settings - Fork 4k
docs: add rename map and empty cam guide #3065
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,145 @@ | ||||||
| # Understanding the Rename Map and Empty Cameras | ||||||
|
|
||||||
| When you train or evaluate a robot policy, your **dataset** or **environment** hands you observations under one set of keys (e.g. `observation.images.front`, `observation.images.eagle`), while your **policy** was built to expect another (e.g. `observation.images.image`, `observation.images.image2`). The rename map is how you bridge that gap without changing the policy or the data source. | ||||||
|
|
||||||
| This guide explains why it exists, how to use it in training and evaluation, and when to use **empty cameras** so you can fine-tune multi-camera policies on datasets that have fewer views. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Why observation keys don’t always match | ||||||
|
|
||||||
| Policies have a fixed set of **input feature names** (often coming from a pretrained config). For example: | ||||||
|
|
||||||
| - **XVLA-base** expects three image keys: `observation.images.image`, `observation.images.image2`, `observation.images.image3`. | ||||||
| - **pi0-fast-libero** might expect `observation.images.base_0_rgb` and `observation.images.left_wrist_0_rgb`. | ||||||
|
|
||||||
| Your dataset or sim might use completely different names: `observation.images.front`, `observation.images.eagle`, `observation.images.glove` (e.g. [svla_so100_sorting](https://huggingface.co/datasets/lerobot/svla_so100_sorting)). Or your eval env (e.g. LIBERO) might return `observation.images.image` and `observation.images.image2`. | ||||||
|
|
||||||
| Rather than renaming columns in the dataset or editing the policy code, LeRobot lets you pass a **rename map**: a dictionary that says “when you see this key in the data, treat it as this key for the policy.” Renaming is applied in the preprocessing pipeline so the policy always receives the keys it expects. | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## How the rename map works | ||||||
|
|
||||||
| The rename map is a dictionary: | ||||||
|
|
||||||
| - **Keys** = observation keys as produced by your **dataset** (training) or **environment** (evaluation). | ||||||
| - **Values** = the observation keys your **policy** expects. | ||||||
|
|
||||||
| Only keys listed in the map are renamed; everything else is left as-is. Under the hood, the [RenameObservationsProcessorStep](https://github.com/huggingface/lerobot/blob/main/src/lerobot/processor/rename_processor.py) runs in the preprocessor and rewrites observation keys (and keeps normalization stats aligned) so the batch matches the policy’s `input_features`. | ||||||
|
||||||
| Only keys listed in the map are renamed; everything else is left as-is. Under the hood, the [RenameObservationsProcessorStep](https://github.com/huggingface/lerobot/blob/main/src/lerobot/processor/rename_processor.py) runs in the preprocessor and rewrites observation keys (and keeps normalization stats aligned) so the batch matches the policy’s `input_features`. | |
| Only keys listed in the map are renamed; everything else is left as-is. Under the hood, the [RenameObservationsProcessorStep](https://github.com/huggingface/lerobot/blob/main/src/lerobot/processor/rename_processor.py) runs in the preprocessor and rewrites observation keys and updates feature metadata so the batch matches the policy’s `input_features`. If you rely on per-key normalization statistics, make sure to rename those stats consistently with your rename map as well. |
Copilot
AI
Mar 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quick-reference table uses || at the start of each row, which is not valid Markdown table syntax and likely won’t render correctly. It should be a standard pipe table (single leading | per row).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The policy name here is inconsistent with the rest of the docs/repo naming. Elsewhere we refer to the model as
pi0fast-libero(no hyphen afterpi0). Usingpi0-fast-liberomay confuse users and doesn’t match the Hugging Face repo ID shown later in this doc.