HumanCompatibleAI / imitation

Clean PyTorch implementations of imitation and reward learning algorithms
https://imitation.readthedocs.io/
MIT License
1.33k stars 248 forks source link

Examples Don't work #815

Closed AdvanceXplorer closed 11 months ago

AdvanceXplorer commented 1 year ago

Hi,

I am using Python 3.10.9 with gym = 0.21.0. When i try to run imitation-master\examples\quickstart.py, I get the following error:

Traceback (most recent call last): File "C:\Users\advan\anaconda3\lib\site-packages\gym\envs\registration.py", line 158, in spec return self.env_specs[id] KeyError: 'seals/CartPole-v0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:\Users\advan\OneDrive\Masaüstü\imitation-master\examples\quickstart.py", line 17, in env = make_vec_env( File "C:\Users\advan\anaconda3\lib\site-packages\imitation\util\util.py", line 107, in make_vec_env spec = gym.spec(env_name) File "C:\Users\advan\anaconda3\lib\site-packages\gym\envs\registration.py", line 239, in spec return registry.spec(id) File "C:\Users\advan\anaconda3\lib\site-packages\gym\envs\registration.py", line 185, in spec raise error.DeprecatedEnv( gym.error.DeprecatedEnv: Env seals/CartPole-v0 not found (valid versions include ['CartPole-v0', 'CartPole-v1']),

which is the same as: https://imitation.readthedocs.io/_/downloads/en/stable/pdf/).readthedocs.io/_/downloads/en/stable/pdf/.

How can i fix this?

nil123532 commented 1 year ago

same

yl-wang996 commented 1 year ago

same

Charles-Lim93 commented 12 months ago

Same here. It seems have problem with Seals..

ernestum commented 11 months ago

Hi, thanks for reaching out. We don't support gym any more. Try running with gymnasium. Also make sure you have at least seals version 0.2.1 installed.

Note also that I found a (unrelated) bug in the quickstart.py, that is addressed in #823. So until this is merged I recommend to try that branch.