araffin / learning-to-drive-in-5-minutes

Implementation of reinforcement learning approach to make a car learn to drive smoothly in minutes
https://towardsdatascience.com/learning-to-drive-smoothly-in-minutes-450a7cdb35f4
MIT License
287 stars 85 forks source link

stable-baselines version requirement is incorrect #28

Closed mechovation closed 4 years ago

mechovation commented 4 years ago

requirements.txt lists:

stable-baselines>=2.9.0

pip install of stable-baselines resulted in 2.10.0, meeting the listed requirements, but resulting in this error:

Traceback (most recent call last): File "train.py", line 19, in from stable_baselines.ppo2.ppo2 import constfn ImportError: cannot import name 'constfn'

recommend updating requirements.txt to reflect stable-baselines==2.9.0

araffin commented 4 years ago

Hello, Thanks for pointing that out. I would appreciate a pull request that either:

  1. Fix the requirements to 2.9.0
  2. Do the changes to make it compatible with 2.10.0 (preferred) and set the minimum version to 2.10.0
bishibashiB commented 4 years ago

I fixed it like this (taking some change folder infos from stable baselines docs)

-from stable_baselines.ppo2.ppo2 import constfn
+from stable_baselines.common.schedules import constfn
araffin commented 4 years ago

As mentioned before, I would appreciate a PR that solves that issue ;) (there will be also some changes in SAC that needs to be done)