atari-model-zoo icon indicating copy to clipboard operation
atari-model-zoo copied to clipboard

NotImplementedError when running generate_rollout

Open agopal42 opened this issue 5 years ago • 5 comments

Traceback (most recent call last): File "/home/anand/IDSIA/mutual-information-keypoints/collect_atari_data.py", line 27, in results = generate_rollout(m,min_frames=2500,max_frames=2500) File "/home/anand/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/atari_zoo/rollout.py", line 135, in generate_rollout obs = env.reset() File "/home/anand/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/gym/core.py", line 258, in reset return self.observation(observation) File "/home/anand/anaconda3/envs/tf-gpu/lib/python3.6/site-packages/gym/core.py", line 265, in observation raise NotImplementedError NotImplementedError

agopal42 avatar Oct 11 '19 12:10 agopal42

Same problem. Any workarounds?

akolobov avatar Oct 23 '19 10:10 akolobov

It has to do with the API format for the methods like step(), reset(), render() etc. in atari_wrappers.py in atari_zoo which follow the old gym API format of using ._step(). By changing it to align with API format of the latest gym versions (0.15.3) by replacing the "._method_name()" with ".method_name()" and , it worked for me. Hope this helps!

agopal42 avatar Oct 23 '19 11:10 agopal42

Yeah, thanks, just figured it out too! Instead of updating the model zoo code I went for installing gym==0.12.0 though.

akolobov avatar Oct 23 '19 12:10 akolobov

Should now be fixed -- updated code according to @agopal42 's suggestion

jal278 avatar May 25 '20 23:05 jal278

@jal278 , thank you!

akolobov avatar May 26 '20 00:05 akolobov