Cleanup eval example

This commit is contained in:
Simon Alibert 2024-05-05 14:46:29 +02:00
parent f4dce55b46
commit 53d8f6b785
2 changed files with 3 additions and 7 deletions

View File

@ -133,20 +133,17 @@ Check out [example 2](./examples/2_evaluate_pretrained_policy.py) to see how you
Or you can achieve the same result by executing our script from the command line:
```bash
# TODO: Not working right now, update `lerobot/diffusion_policy_pusht_image` to fix
python lerobot/scripts/eval.py \
-p lerobot/diffusion_pusht \
eval_episodes=10 \
hydra.run.dir=outputs/eval/example_hub
eval.n_episodes=10 \
eval.batch_size=10
```
After training your own policy, you can also re-evaluate the checkpoints with:
```bash
python lerobot/scripts/eval.py \
-p PATH/TO/TRAIN/OUTPUT/FOLDER \
eval_episodes=10 \
hydra.run.dir=outputs/eval/example_dir
-p PATH/TO/TRAIN/OUTPUT/FOLDER
```
See `python lerobot/scripts/eval.py --help` for more instructions.

View File

@ -33,7 +33,6 @@ dataset = make_dataset(hydra_cfg)
# For this example, no arguments need to be passed because the defaults are set up for PushT.
# If you're doing something different, you will likely need to change at least some of the defaults.
cfg = DiffusionConfig()
# TODO(alexander-soare): Remove LR scheduler from the policy.
policy = DiffusionPolicy(cfg, dataset_stats=dataset.stats)
policy.train()
policy.to(device)