eleurent / rl-agents

Implementations of Reinforcement Learning and Planning algorithms
MIT License
591 stars 153 forks source link

ImportError: cannot import name 'RecordVideo' #78

Closed skonwa closed 2 years ago

skonwa commented 2 years ago

When I run Ego-attention in Pycharm Terminal with following command "python experiments.py evaluate configs/IntersectionEnv/env.json configs/IntersectionEnv/agents/DQNAgent/ego_attention_2h.json --train --episodes=4000 --name-from-config",it come up with this error:ImportError: cannot import name 'RecordVideo',what should I do?

eleurent commented 2 years ago

This is because the Monitor wrapper has been replaced by RecordVideo and RecordEpisodeStatistics in the latest gym versions. So you should simply update to gym>=0.20

skonwa commented 2 years ago

Thanks for your help!I will try it.