Merge remote-tracking branch 'upstream/main' into remove_extra_frame
This commit is contained in:
commit
a5f85c71a5
|
@ -135,7 +135,7 @@ Check out [examples](./examples) to see how you can load a pretrained policy fro
|
||||||
Or you can achieve the same result by executing our script from the command line:
|
Or you can achieve the same result by executing our script from the command line:
|
||||||
```bash
|
```bash
|
||||||
python lerobot/scripts/eval.py \
|
python lerobot/scripts/eval.py \
|
||||||
-p lerobot/diffusion_policy_pusht_image \
|
-p lerobot/diffusion_pusht \
|
||||||
eval_episodes=10 \
|
eval_episodes=10 \
|
||||||
hydra.run.dir=outputs/eval/example_hub
|
hydra.run.dir=outputs/eval/example_hub
|
||||||
```
|
```
|
||||||
|
|
|
@ -10,7 +10,7 @@ from huggingface_hub import snapshot_download
|
||||||
from lerobot.scripts.eval import eval
|
from lerobot.scripts.eval import eval
|
||||||
|
|
||||||
# Get a pretrained policy from the hub.
|
# Get a pretrained policy from the hub.
|
||||||
pretrained_policy_name = "lerobot/diffusion_policy_pusht_image"
|
pretrained_policy_name = "lerobot/diffusion_pusht"
|
||||||
pretrained_policy_path = Path(snapshot_download(pretrained_policy_name))
|
pretrained_policy_path = Path(snapshot_download(pretrained_policy_name))
|
||||||
# OR uncomment the following to evaluate a policy from the local outputs/train folder.
|
# OR uncomment the following to evaluate a policy from the local outputs/train folder.
|
||||||
# pretrained_policy_path = Path("outputs/train/example_pusht_diffusion")
|
# pretrained_policy_path = Path("outputs/train/example_pusht_diffusion")
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
Usage examples:
|
Usage examples:
|
||||||
|
|
||||||
You want to evaluate a model from the hub (eg: https://huggingface.co/lerobot/diffusion_policy_pusht_image)
|
You want to evaluate a model from the hub (eg: https://huggingface.co/lerobot/diffusion_pusht)
|
||||||
for 10 episodes.
|
for 10 episodes.
|
||||||
|
|
||||||
```
|
```
|
||||||
python lerobot/scripts/eval.py -p lerobot/diffusion_policy_pusht_image eval.n_episodes=10
|
python lerobot/scripts/eval.py -p lerobot/diffusion_pusht eval.n_episodes=10
|
||||||
```
|
```
|
||||||
|
|
||||||
OR, you want to evaluate a model checkpoint from the LeRobot training script for 10 episodes.
|
OR, you want to evaluate a model checkpoint from the LeRobot training script for 10 episodes.
|
||||||
|
|
||||||
```
|
```
|
||||||
python lerobot/scripts/eval.py \
|
python lerobot/scripts/eval.py \
|
||||||
-p outputs/train/diffusion_policy_pusht_image/checkpoints/005000 \
|
-p outputs/train/diffusion_pusht/checkpoints/005000 \
|
||||||
eval.n_episodes=10
|
eval.n_episodes=10
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ Note that in both examples, the repo/folder should contain at least `config.json
|
||||||
Note the formatting for providing the number of episodes. Generally, you may provide any number of arguments
|
Note the formatting for providing the number of episodes. Generally, you may provide any number of arguments
|
||||||
with `qualified.parameter.name=value`. In this case, the parameter eval.n_episodes appears as `n_episodes`
|
with `qualified.parameter.name=value`. In this case, the parameter eval.n_episodes appears as `n_episodes`
|
||||||
nested under `eval` in the `config.yaml` found at
|
nested under `eval` in the `config.yaml` found at
|
||||||
https://huggingface.co/lerobot/diffusion_policy_pusht_image/tree/main.
|
https://huggingface.co/lerobot/diffusion_pusht/tree/main.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
@ -58,7 +58,7 @@ def test_examples_3_and_2():
|
||||||
file_contents = _find_and_replace(
|
file_contents = _find_and_replace(
|
||||||
file_contents,
|
file_contents,
|
||||||
[
|
[
|
||||||
('pretrained_policy_name = "lerobot/diffusion_policy_pusht_image"', ""),
|
('pretrained_policy_name = "lerobot/diffusion_pusht"', ""),
|
||||||
("pretrained_policy_path = Path(snapshot_download(pretrained_policy_name))", ""),
|
("pretrained_policy_path = Path(snapshot_download(pretrained_policy_name))", ""),
|
||||||
(
|
(
|
||||||
'# pretrained_policy_path = Path("outputs/train/example_pusht_diffusion")',
|
'# pretrained_policy_path = Path("outputs/train/example_pusht_diffusion")',
|
||||||
|
|
Loading…
Reference in New Issue