mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-23 04:30:10 +00:00
chore: apply prettier formatting to docs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -145,7 +145,7 @@ class LiberoVelocityProcessorStep(ObservationProcessorStep):
|
|||||||
state = torch.cat([eef_pos, eef_axisangle, eef_vel,
|
state = torch.cat([eef_pos, eef_axisangle, eef_vel,
|
||||||
gripper_pos, gripper_vel], dim=-1) # 14D
|
gripper_pos, gripper_vel], dim=-1) # 14D
|
||||||
return state
|
return state
|
||||||
````
|
```
|
||||||
|
|
||||||
### 4. **Cleaner Environment Code**
|
### 4. **Cleaner Environment Code**
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ lerobot-eval \
|
|||||||
## Key flags
|
## Key flags
|
||||||
|
|
||||||
| Flag | Default | Description |
|
| Flag | Default | Description |
|
||||||
|---|---|---|
|
| ----------------------- | -------------- | ------------------------------------------------------------------------------------- |
|
||||||
| `--policy.path` | required | Hub repo ID or local path to a pretrained model |
|
| `--policy.path` | required | Hub repo ID or local path to a pretrained model |
|
||||||
| `--env.type` | required | Benchmark name (`pusht`, `libero`, `metaworld`, etc.) |
|
| `--env.type` | required | Benchmark name (`pusht`, `libero`, `metaworld`, etc.) |
|
||||||
| `--env.task` | varies | Task or suite name (e.g. `libero_spatial`, `libero_10`) |
|
| `--env.task` | varies | Task or suite name (e.g. `libero_spatial`, `libero_10`) |
|
||||||
@@ -60,7 +60,7 @@ See each benchmark's documentation ([LIBERO](libero), [Meta-World](metaworld)) f
|
|||||||
`batch_size` controls how many environments run in parallel within a single `VectorEnv`:
|
`batch_size` controls how many environments run in parallel within a single `VectorEnv`:
|
||||||
|
|
||||||
| `batch_size` | Behavior |
|
| `batch_size` | Behavior |
|
||||||
|---|---|
|
| ------------- | -------------------------------------------------------------------- |
|
||||||
| `0` (default) | Auto-tune: `floor(cpu_cores × 0.7)`, capped by `n_episodes` and `64` |
|
| `0` (default) | Auto-tune: `floor(cpu_cores × 0.7)`, capped by `n_episodes` and `64` |
|
||||||
| `1` | Single environment, synchronous. Useful for debugging |
|
| `1` | Single environment, synchronous. Useful for debugging |
|
||||||
| `N` | N environments step in parallel via `AsyncVectorEnv` |
|
| `N` | N environments step in parallel via `AsyncVectorEnv` |
|
||||||
@@ -68,6 +68,7 @@ See each benchmark's documentation ([LIBERO](libero), [Meta-World](metaworld)) f
|
|||||||
When `batch_size > 1` and `use_async_envs=true`, each environment runs in its own subprocess via Gymnasium's `AsyncVectorEnv`. This parallelizes the simulation stepping (the main bottleneck), while the policy runs a single batched forward pass on GPU.
|
When `batch_size > 1` and `use_async_envs=true`, each environment runs in its own subprocess via Gymnasium's `AsyncVectorEnv`. This parallelizes the simulation stepping (the main bottleneck), while the policy runs a single batched forward pass on GPU.
|
||||||
|
|
||||||
**Example:** On a 16-core machine with `n_episodes=100`:
|
**Example:** On a 16-core machine with `n_episodes=100`:
|
||||||
|
|
||||||
- Auto batch_size = `floor(16 × 0.7)` = `11`
|
- Auto batch_size = `floor(16 × 0.7)` = `11`
|
||||||
- 11 environments step simultaneously → ~11× faster than sequential
|
- 11 environments step simultaneously → ~11× faster than sequential
|
||||||
|
|
||||||
@@ -92,7 +93,7 @@ For multi-task benchmarks (e.g. LIBERO with 10 tasks), environments are wrapped
|
|||||||
### Tuning for speed
|
### Tuning for speed
|
||||||
|
|
||||||
| Situation | Recommendation |
|
| Situation | Recommendation |
|
||||||
|---|---|
|
| ------------------------------ | ----------------------------------------------------- |
|
||||||
| Slow eval, low GPU utilization | Increase `batch_size` (or leave at auto) |
|
| Slow eval, low GPU utilization | Increase `batch_size` (or leave at auto) |
|
||||||
| Out of memory (system RAM) | Decrease `batch_size` |
|
| Out of memory (system RAM) | Decrease `batch_size` |
|
||||||
| Out of GPU memory | Decrease `batch_size`, or use `--policy.use_amp=true` |
|
| Out of GPU memory | Decrease `batch_size`, or use `--policy.use_amp=true` |
|
||||||
@@ -108,7 +109,7 @@ Results are written to `output_dir` (default: `outputs/eval/<date>/<time>_<job_n
|
|||||||
### Metrics
|
### Metrics
|
||||||
|
|
||||||
| Metric | Description |
|
| Metric | Description |
|
||||||
|---|---|
|
| ---------------- | -------------------------------------------------------------------- |
|
||||||
| `pc_success` | Success rate (%). Based on `info["is_success"]` from the environment |
|
| `pc_success` | Success rate (%). Based on `info["is_success"]` from the environment |
|
||||||
| `avg_sum_reward` | Mean cumulative reward per episode |
|
| `avg_sum_reward` | Mean cumulative reward per episode |
|
||||||
| `avg_max_reward` | Mean peak reward per episode |
|
| `avg_max_reward` | Mean peak reward per episode |
|
||||||
|
|||||||
Reference in New Issue
Block a user