Spaces:
Running
Running
fix(CLI tools): fixing CLI tools examples
#15
by CarolinePascal HF Staff - opened
app/src/content/chapters/folding/09-learnings.mdx
CHANGED
|
@@ -22,29 +22,17 @@ If you're training a policy for a new manipulation task with LeRobot, **here's t
|
|
| 22 |
2. **Collect 50–100 clean demonstrations.** Quality over volume. Consistent technique, good camera angles, deliberate motions. This is your foundation, everything else builds on it.
|
| 23 |
3. **Train a reward model.** Use [SARM](https://huggingface.co/docs/lerobot/sarm) to score your episodes and enable RABC during training. This allows the policy to focus on the best demonstrations, which is crucial for longer tasks.
|
| 24 |
4. **Train a baseline and watch it fail.** Film the rollouts. Understanding *how* and *where* it breaks tells you exactly what kind of data to collect next.
|
| 25 |
-
5. **Enable action interpolation and [RTC](https://huggingface.co/docs/lerobot/rtc).** This smooths transitions and speeds up execution. Action interpolation upsamples the policy's 30 Hz output to your robot's control frequency (e.g. 90 Hz), and RTC overlaps inference with execution. Both features are available at inference time with
|
| 26 |
|
| 27 |
```bash
|
| 28 |
-
|
| 29 |
-
--policy.path=outputs/checkpoints/last/pretrained_model \
|
| 30 |
--robot.type=bi_openarm_follower \
|
| 31 |
-
--policy.
|
| 32 |
--rtc.enabled=true \
|
| 33 |
--rtc.execution_horizon=20 \
|
| 34 |
--interpolation_multiplier=3
|
| 35 |
```
|
| 36 |
|
| 37 |
-
RTC can also be enabled at training time with the appropriate configuration:
|
| 38 |
-
|
| 39 |
-
```python
|
| 40 |
-
policy_cfg.rtc_config = RTCConfig(
|
| 41 |
-
enabled=True,
|
| 42 |
-
execution_horizon=20,
|
| 43 |
-
max_guidance_weight=5.0,
|
| 44 |
-
prefix_attention_schedule=RTCAttentionSchedule.LINEAR,
|
| 45 |
-
)
|
| 46 |
-
```
|
| 47 |
-
|
| 48 |
6. **Find the right [action representation](https://huggingface.co/docs/lerobot/action_representations).** LeRobot uses absolute actions by default. Switching to relative trajectory was one of our key improvements, and unlocked consistency with π0.5 pretraining. To enable relative actions for π0/π0.5 using LeRobot, first precompute the relative action statistics for your dataset, then train with the flag enabled:
|
| 49 |
|
| 50 |
```bash
|
|
|
|
| 22 |
2. **Collect 50–100 clean demonstrations.** Quality over volume. Consistent technique, good camera angles, deliberate motions. This is your foundation, everything else builds on it.
|
| 23 |
3. **Train a reward model.** Use [SARM](https://huggingface.co/docs/lerobot/sarm) to score your episodes and enable RABC during training. This allows the policy to focus on the best demonstrations, which is crucial for longer tasks.
|
| 24 |
4. **Train a baseline and watch it fail.** Film the rollouts. Understanding *how* and *where* it breaks tells you exactly what kind of data to collect next.
|
| 25 |
+
5. **Enable action interpolation and [RTC](https://huggingface.co/docs/lerobot/rtc).** This smooths transitions and speeds up execution. Action interpolation upsamples the policy's 30 Hz output to your robot's control frequency (e.g. 90 Hz), and RTC overlaps inference with execution. Both features are available at inference time with the corresponding flags:
|
| 26 |
|
| 27 |
```bash
|
| 28 |
+
python examples/rtc/eval_with_real_robot.py \
|
|
|
|
| 29 |
--robot.type=bi_openarm_follower \
|
| 30 |
+
--policy.path=outputs/checkpoints/last/pretrained_model \
|
| 31 |
--rtc.enabled=true \
|
| 32 |
--rtc.execution_horizon=20 \
|
| 33 |
--interpolation_multiplier=3
|
| 34 |
```
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
6. **Find the right [action representation](https://huggingface.co/docs/lerobot/action_representations).** LeRobot uses absolute actions by default. Switching to relative trajectory was one of our key improvements, and unlocked consistency with π0.5 pretraining. To enable relative actions for π0/π0.5 using LeRobot, first precompute the relative action statistics for your dataset, then train with the flag enabled:
|
| 37 |
|
| 38 |
```bash
|