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
284 stars 88 forks source link

Fix for new Stable-Baselines version #32

Closed kncrane closed 3 years ago

kncrane commented 3 years ago

updates constfn import in train.py, total_episode_reward_logger import in custom_ppo and custom_sac, and sets min SB version to 2.10.0

closes #28

kncrane commented 3 years ago

python train.py --algo sac -vae path-to-vae.pkl -n 5000 runs fine

python train.py --algo ppo2 -vae path-to-vae.pkl -n 5000 throws the error TypeError: Can't instantiate abstract class Runner with abstract methods _run on line 31 of custom_ppo2

looks like the abstract method in common/runners.py has changed from def run(self) to def _run(self)

adding underscore to run method on line 128 of custom_ppo2.py solved ... will push commit

P.S. also had to uncomment the tensorflow line in requirements.txt and set to 1.14.0 as 1.10.1 leads to conflicts (assume that's why its commented out)

araffin commented 3 years ago

Perfect, thanks again =)