mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-27 22:49:48 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
+11
-6
@@ -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.
|
||||
|
||||

|
||||
*Figure 1: An overview of the LIBERO benchmark.*
|
||||
_Figure 1: An overview of the LIBERO benchmark._
|
||||
|
||||
## 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:
|
||||
|
||||
1. **Install via pip** (recommended):
|
||||
|
||||
```bash
|
||||
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`).
|
||||
|
||||
⚠️ **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
|
||||
|
||||
To train or evaluate a policy, you use `make_policy`, which builds a feature-naming dictionary for the observations the policy expects.
|
||||
@@ -101,13 +103,13 @@ 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.
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
### 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).
|
||||
- Or add a breakpoint in `train.py` and inspect:
|
||||
```python
|
||||
|
||||
````python
|
||||
print(policy.config.input_features)
|
||||
To ensure you can just check what your policy expects as `input_features`:
|
||||
|
||||
@@ -116,12 +118,13 @@ When using LIBERO through LeRobot, policies interact with the environment via **
|
||||
```python
|
||||
print(policy.config.input_features)
|
||||
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:
|
||||
|
||||
```python
|
||||
````python
|
||||
import pyarrow.parquet as pq
|
||||
import shutil
|
||||
|
||||
@@ -187,7 +190,7 @@ python src/lerobot/scripts/train.py \
|
||||
--eval.batch_size=1 \
|
||||
--eval.n_episodes=1 \
|
||||
--eval_freq=1000 \
|
||||
```
|
||||
````
|
||||
|
||||
---
|
||||
|
||||
@@ -213,11 +216,13 @@ This happens because Colab’s rendering contexts are **not thread-safe**, and `
|
||||
Parallel evaluation is not supported in Colab. To avoid these issues, run sequentially or disable multitask evaluation:
|
||||
|
||||
Run sequentially:
|
||||
|
||||
```bash
|
||||
--env.max_parallel_tasks=1
|
||||
```
|
||||
|
||||
Or disable multitask evaluation:
|
||||
|
||||
```bash
|
||||
--env.multitask_eval=False
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user