openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.79k stars 8.61k forks source link

TypeError: update() got an unexpected keyword argument 'force' #905

Closed lechatthecat closed 5 years ago

lechatthecat commented 6 years ago

When I run this code: https://github.com/matthiasplappert/keras-rl/blob/master/examples/dqn_atari.py

I get an error: Traceback (most recent call last): File "atari.py", line 111, in dqn.fit(env, callbacks=callbacks, nb_steps=1750000, log_interval=10000) File "/usr/local/lib/python3.5/dist-packages/rl/core.py", line 196, in fit callbacks.on_step_end(episode_step, step_logs) File "/usr/local/lib/python3.5/dist-packages/rl/callbacks.py", line 75, in on_step_end callback.on_step_end(step, logs=logs) File "/usr/local/lib/python3.5/dist-packages/rl/callbacks.py", line 245, in on_step_end self.progbar.update((self.step % self.interval) + 1, values=values, force=True) TypeError: update() got an unexpected keyword argument 'force'

python version: 3.5 keras-rl version: 0.4.0 gym version: gym-0.9.5

lechatthecat commented 6 years ago

But if I change the verbose of fit function to 2, it works.

aiskuld commented 6 years ago

I'm on python 3.6, but I came across the same issue today. Seems like it is an issue with the progress bar visualization, but I did not look that far into it

guidesc commented 6 years ago

Same issue. Python: 3.5.1, and if changed to 2, it works. Any ideas how to fix the issue?

marcmolla commented 6 years ago

This is a keras-rl issue and it is solved in this PR: https://github.com/keras-rl/keras-rl/pull/179

Just install keras-rl from GitHub and it should work

joseortiz3 commented 6 years ago

+1 for the above comment. If you install keras-rl from pip you will run into this issue.

lechatthecat commented 6 years ago

I uninstalled keras-rl & installed it from github and the problem is gone. What I did: $ sudo python3.5 -m pip uninstall keras-rl $ python3.5 -m pip install git+https://github.com/keras-rl/keras-rl.git

marcmolla commented 6 years ago

Check if you have more than one keras-rl deployment (this happened to me). If the error persist, I would say that is better to ask for help in keras-rl repo.

christopherhesse commented 5 years ago

This doesn't look like a gym issue, please file it on keras-rl, thanks!