[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2025-09-05 09:55:42 +00:00
parent 504421949c
commit 38f7229078
+13 -8
View File
@@ -15,7 +15,7 @@ LIBERO includes **five task suites**:
Together, these suites cover **130 tasks**, ranging from simple object manipulations to complex multi-step scenarios. LIBERO is meant to grow over time, and to serve as a shared benchmark where the community can test and improve lifelong learning algorithms. Together, these suites cover **130 tasks**, ranging from simple object manipulations to complex multi-step scenarios. LIBERO is meant to grow over time, and to serve as a shared benchmark where the community can test and improve lifelong learning algorithms.
![An overview of the LIBERO benchmark](https://libero-project.github.io/assets/img/libero/fig1.png) ![An overview of the LIBERO benchmark](https://libero-project.github.io/assets/img/libero/fig1.png)
*Figure 1: An overview of the LIBERO benchmark.* _Figure 1: An overview of the LIBERO benchmark._
## Evaluating with LIBERO ## Evaluating with LIBERO
@@ -27,6 +27,7 @@ To install LIBERO, first follow the [LeRobot Installation Guide](https://hugging
Once LeRobot is installed, there are two options: Once LeRobot is installed, there are two options:
1. **Install via pip** (recommended): 1. **Install via pip** (recommended):
```bash ```bash
pip install "lerobot[libero,smolvla]" pip install "lerobot[libero,smolvla]"
``` ```
@@ -85,6 +86,7 @@ When using LIBERO through LeRobot, policies interact with the environment via **
- `observation.images.image2` wrist camera view (`robot0_eye_in_hand_image`). - `observation.images.image2` wrist camera view (`robot0_eye_in_hand_image`).
⚠️ **Note:** LeRobot enforces the `.images.*` prefix for any visual features. Make sure your dataset metadata keys match this convention when evaluating. ⚠️ **Note:** LeRobot enforces the `.images.*` prefix for any visual features. Make sure your dataset metadata keys match this convention when evaluating.
## Input Features and Metadata Alignment ## Input Features and Metadata Alignment
To train or evaluate a policy, you use `make_policy`, which builds a feature-naming dictionary for the observations the policy expects. To train or evaluate a policy, you use `make_policy`, which builds a feature-naming dictionary for the observations the policy expects.
@@ -101,27 +103,28 @@ When using LIBERO through LeRobot, policies interact with the environment via **
Such mismatches will cause `KeyError`s. This may be due to assumptions in `make_policy` or missing error handling. Such mismatches will cause `KeyError`s. This may be due to assumptions in `make_policy` or missing error handling.
--- ***
### How to Check Expected Features ### How to Check Expected Features
- Open your policy config (`config.json`), e.g. [example here](https://huggingface.co/jadechoghari/smolvla-libero/blob/main/config.json). - Open your policy config (`config.json`), e.g. [example here](https://huggingface.co/jadechoghari/smolvla-libero/blob/main/config.json).
- Or add a breakpoint in `train.py` and inspect: - Or add a breakpoint in `train.py` and inspect:
```python
````python
print(policy.config.input_features) print(policy.config.input_features)
To ensure you can just check what your policy expects as `input_features`: To ensure you can just check what your policy expects as `input_features`:
- Open your policy config (`config.json`), e.g. [example here](https://huggingface.co/jadechoghari/smolvla-libero/blob/main/config.json). - Open your policy config (`config.json`), e.g. [example here](https://huggingface.co/jadechoghari/smolvla-libero/blob/main/config.json).
- Or add a breakpoint in `train.py` and inspect: - Or add a breakpoint in `train.py` and inspect:
```python ```python
print(policy.config.input_features) print(policy.config.input_features)
Fixing KeyErrors (Preprocessing Example) Fixing KeyErrors (Preprocessing Example)
````
## Fixing KeyErrors (Preprocessing Example) ## Fixing KeyErrors (Preprocessing Example)
If your dataset columns do not follow the expected naming, you can rename them in-place before training: If your dataset columns do not follow the expected naming, you can rename them in-place before training:
```python ````python
import pyarrow.parquet as pq import pyarrow.parquet as pq
import shutil import shutil
@@ -187,7 +190,7 @@ python src/lerobot/scripts/train.py \
--eval.batch_size=1 \ --eval.batch_size=1 \
--eval.n_episodes=1 \ --eval.n_episodes=1 \
--eval_freq=1000 \ --eval_freq=1000 \
``` ````
--- ---
@@ -213,11 +216,13 @@ This happens because Colabs rendering contexts are **not thread-safe**, and `
Parallel evaluation is not supported in Colab. To avoid these issues, run sequentially or disable multitask evaluation: Parallel evaluation is not supported in Colab. To avoid these issues, run sequentially or disable multitask evaluation:
Run sequentially: Run sequentially:
```bash ```bash
--env.max_parallel_tasks=1 --env.max_parallel_tasks=1
``` ```
Or disable multitask evaluation: Or disable multitask evaluation:
```bash ```bash
--env.multitask_eval=False --env.multitask_eval=False
``` ```