Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success rate computation for diffusion_policy pushT is broken since the release of the V-1.0.0 of the gymnasium #470

Closed
1 of 2 tasks
zimka opened this issue Oct 13, 2024 · 0 comments · Fixed by #471
Closed
1 of 2 tasks

Comments

@zimka
Copy link
Contributor

zimka commented Oct 13, 2024

System Info

- `lerobot` version: 0.1.0
- Platform: Linux-6.5.0-41-generic-x86_64-with-glibc2.35
- Python version: 3.10.15
- Huggingface_hub version: 0.25.2
- Dataset version: 3.0.1
- Numpy version: 1.26.4
- PyTorch version (GPU?): 2.4.1+cu121 (True)
- Cuda version: 12010
- Using GPU in script?: True

Information

  • One of the scripts in the examples/ folder of LeRobot
  • My own task or dataset (give details below)

Reproduction

TLDR: I want to reproduce diffusion policy training for diffT with visual input, and I can see in wandb logs that loss, metrics and logged videos behave as expected, while success_rate during eval is strictly 0.

Reproduction steps (exactly as they are for pretrained model https://huggingface.co/lerobot/diffusion_pusht):

  1. python lerobot/scripts/train.py hydra.run.dir=outputs/train/diffusion_pusht hydra.job.name=diffusion_pusht policy=diffusion env=pusht env.task=PushT-v0 dataset_repo_id=lerobot/pusht training.offline_steps=200000 training.save_freq=20000 training.eval_freq=10000 eval.n_episodes=50 wandb.enable=true wandb.disable_artifact=true device=cuda
  2. python lerobot/scripts/eval.py -p outputs/train/diffusion_pusht/checkpoints/last/pretrained_model/

The output is: {'avg_sum_reward': 101.59729324556768, 'avg_max_reward': 0.9727046033094218, 'pc_success': 0.0, 'eval_s': 69.18956518173218, 'eval_ep_s': 1.3837913274765015}

The problem is: 'pc_success': 0.0
Here are the wandb logs: https://wandb.ai/zimka/lerobot/runs/r2qef1ii

Expected behavior

I expect 'pc_success' to be somwhere around 70, as it it

The issue is most likely caused by recent release of gymnasium: https://github.com/Farama-Foundation/Gymnasium/releases/tag/v1.0.0

It looks like the final_info key-value pair that is used in lerobot/scripts/eval.py is no longer returned from the env.step() method, effectively breaking the code for success_rate evaluation inside lerobot/scripts/eval.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant