pat-coady / trpo

Trust Region Policy Optimization with TensorFlow and OpenAI Gym
https://learningai.io/projects/2017/07/28/ai-gym-workout.html
MIT License
360 stars 106 forks source link

Features to save and reuse the trained models are now integrated #17

Closed sanjaythakur closed 6 years ago

sanjaythakur commented 6 years ago

The 'train.py' script now saves the model once the training has been completed which can be reused again at a later point in time.

pat-coady commented 6 years ago

Sanjay - very sorry for the delay. Can you describe any testing you did to check your improvements didn't break anything?

Thanks a lot, Pat

sanjaythakur commented 6 years ago

Hi Pat, the only changes I made in the code are

Other than these two changes, I didn't change/modify any part of the existing code. So I don't think it should break anything. For validating the robustness, I have run python train.py from src/ on all the MUJOCO environments except Ant, Humanoid, and HumanoidStandup (because they take a lot of time) over the last three days and then verified the saved models by running reload.py. Everything worked out well.

I hope this answers your question. Let me know if you think it needs more testing.

pat-coady commented 6 years ago

Looks good, merged. Nice addition, thanks a lot.

pat-coady commented 6 years ago

Sanjay -

Sorry, I had to revert this. I got errors when running locally. Also, new code doesn't have docstrings, seems to be indented with tabs and other PEP8 violations.

Some errors I saw on reload. Also, code created some unexpected files src directory.

from: can't read /var/mail/gym ./reload.py: line 8: syntax error near unexpected token (' ./reload.py: line 8:def getScaleAndOffset(env_name):'