diff --git a/README.md b/README.md index 96378c44..ff4aa498 100644 --- a/README.md +++ b/README.md @@ -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: ```bash python lerobot/scripts/eval.py \ --p lerobot/diffusion_policy_pusht_image \ +-p lerobot/diffusion_pusht \ eval_episodes=10 \ hydra.run.dir=outputs/eval/example_hub ``` diff --git a/examples/2_evaluate_pretrained_policy.py b/examples/2_evaluate_pretrained_policy.py index 8a72201f..001054f3 100644 --- a/examples/2_evaluate_pretrained_policy.py +++ b/examples/2_evaluate_pretrained_policy.py @@ -10,7 +10,7 @@ from huggingface_hub import snapshot_download from lerobot.scripts.eval import eval # 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)) # OR uncomment the following to evaluate a policy from the local outputs/train folder. # pretrained_policy_path = Path("outputs/train/example_pusht_diffusion") diff --git a/lerobot/scripts/eval.py b/lerobot/scripts/eval.py index 434e4f11..2a61aaea 100644 --- a/lerobot/scripts/eval.py +++ b/lerobot/scripts/eval.py @@ -2,18 +2,18 @@ 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. ``` -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. ``` 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 ``` @@ -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 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 -https://huggingface.co/lerobot/diffusion_policy_pusht_image/tree/main. +https://huggingface.co/lerobot/diffusion_pusht/tree/main. """ import argparse diff --git a/tests/test_examples.py b/tests/test_examples.py index 8ff808f3..ccce4eb2 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -58,7 +58,7 @@ def test_examples_3_and_2(): file_contents = _find_and_replace( 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("outputs/train/example_pusht_diffusion")',