Fix gymnasium version as pre-1.0.0 #471
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofSyncVectorEnv.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 correctpc_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