hill-a / stable-baselines

A fork of OpenAI Baselines, implementations of reinforcement learning algorithms
http://stable-baselines.readthedocs.io/
MIT License
4.15k stars 725 forks source link

optuna train: algo_sampler = HYPERPARAMS_SAMPLER[algo] KeyError: 'acer' #630

Closed jarlva closed 4 years ago

jarlva commented 4 years ago

Running the following command to tune ACER gives: `(sb) C:\Users\Jake\py\rl-baselines-zoo>python train.py --algo acer --env CartPole-v1 -optimize changing path ========== CartPole-v1 ========== OrderedDict([('ent_coef', 0.0), ('n_envs', 8), ('n_timesteps', 500000.0), ('policy', 'MlpPolicy')]) Using 8 environments Optimizing hyperparameters Sampler: tpe - Pruner: median Traceback (most recent call last): File "train.py", line 304, in verbose=args.verbose) File "C:\Users\Jake\py\rl-baselines-zoo\utils\hyperparams_opt.py", line 70, in hyperparam_optimization algo_sampler = HYPERPARAMS_SAMPLER[algo]

KeyError: 'acer'`

Same with the following DQN. It works with other algos.

pip: absl-py 0.8.1 ai-benchmark 0.1.1 alabaster 0.7.12 alembic 1.3.1 apipkg 1.5 argh 0.26.2 astor 0.8.1 atari-py 0.2.6 atomicwrites 1.3.0 attrs 19.3.0 Babel 2.7.0 certifi 2019.11.28 chardet 3.0.4 cliff 2.16.0 cloudpickle 1.2.2 cmd2 0.8.9 colorama 0.4.3 colorclass 2.2.0 colorlog 4.0.2 coverage 4.5.4 cycler 0.10.0 DataProperty 0.43.1 decorator 4.4.1 docutils 0.15.2 execnet 1.7.1 future 0.18.2 gast 0.2.2 google-pasta 0.1.8 grpcio 1.25.0 gym 0.15.4 c:\users\jake\py\gym h5py 2.10.0 idna 2.8 imagesize 1.1.0 importlab 0.5.1 importlib-metadata 1.2.0 Jinja2 2.10.3 joblib 0.14.1 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 kiwisolver 1.1.0 livereload 2.6.1 Mako 1.1.0 Markdown 3.1.1 MarkupSafe 1.1.1 matplotlib 3.1.2 mbstrdecoder 0.8.1 mkl-service 1.1.2 mock 3.0.5 more-itertools 8.0.2 mpi4py 3.0.3 msgfy 0.0.7 networkx 2.4 ninja 1.9.0.post1 numpy 1.16.5+mkl opencv-python 4.1.2.30 opt-einsum 3.1.0 optuna 0.19.0 packaging 19.2 pandas 0.25.3 pathtools 0.1.2 pathvalidate 0.29.0 pbr 5.4.4 Pillow 6.2.1 pip 19.3.1 pip-check 2.5.2 pluggy 0.13.1 port-for 0.3.1 prettytable 0.7.2 protobuf 3.11.1 psutil 5.6.7 py 1.8.0 py-cpuinfo 5.0.0 pyglet 1.3.2 Pygments 2.5.2 PyOpenGL 3.1.4 pyparsing 2.4.5 pyperclip 1.7.0 pyreadline 2.1 pytablewriter 0.46.1 pytest 5.3.1 pytest-cov 2.8.1 pytest-env 0.6.2 pytest-forked 1.1.3 pytest-xdist 1.30.0 python-dateutil 2.8.1 python-editor 1.0.4 pytz 2019.3 pywin32 227 PyYAML 5.2 requests 2.22.0 scikit-learn 0.22 scipy 1.3.3 setuptools 42.0.2 six 1.13.0 snowballstemmer 2.0.0 Sphinx 2.2.2 sphinx-autobuild 0.7.1 sphinx-rtd-theme 0.4.3 sphinxcontrib-applehelp 1.0.1 sphinxcontrib-devhelp 1.0.1 sphinxcontrib-htmlhelp 1.0.2 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.2 sphinxcontrib-serializinghtml 1.1.3 SQLAlchemy 1.3.11 stable-baselines 2.9.0a0 c:\users\jake\py\stable-baselines stevedore 1.31.0 tabledata 0.9.1 tensorboard 1.14.0 tensorflow 1.14.0 tensorflow-estimator 1.14.0 termcolor 1.1.0 terminaltables 3.1.0 tornado 6.0.3 tqdm 4.40.2 typed-ast 1.4.0 typepy 0.6.0 typing 3.7.4.1 urllib3 1.25.7 watchdog 0.9.0 wcwidth 0.1.7 Werkzeug 0.16.0 wheel 0.33.6 wrapt 1.11.2 zipp 0.6.0

araffin commented 4 years ago

Hello,

This is an issue for the rl zoo, and as mentioned in the README (the documentation on read the doc in only partial): "Note: hyperparameters search is not implemented for ACER and DQN for now."

however, you can submit a PR to the rl zoo that solves this issue.