lerobot icon indicating copy to clipboard operation
lerobot copied to clipboard

Fix gymnasium version as pre-1.0.0

Open zimka opened this issue 4 months ago • 0 comments

What this does

This PR fixes #470 (🐛 Bug) The issue is caused by recent v1.0.0 release of gymnasium from 08.10.2024.

It looks like the final_info key-value pair is no longer available in the output of SyncVectorEnv.step, so evaluation code for success_rate in lerobot/scripts/eval.py gets broken.

The proper fix of the issue requires changes in eval.py and subsequent checks versus available configs. This PR fixes evaluation behavior "as it was before" and postpones the usage of gymnasium==1.0.0 until necessary changes and checks are done.

How it was tested

I have installed gymnasium==0.29.1 (which is the latest pre-1.0.0) locally and re-evaluated trained diffusion policy for pushT and achieved correct pc_success: {'avg_sum_reward': 101.66934858131904, 'avg_max_reward': 0.9727046033094218, 'pc_success': 76.0, 'eval_s': 69.3367211818695, 'eval_ep_s': 1.3867344379425048}

How to checkout & try? (for the reviewer)

git remote add zimka https://github.com/zimka/lerobot git checkout zimka fix_gymnasium_version

zimka avatar Oct 13 '24 16:10 zimka