tristandeleu / pytorch-maml-rl

Reinforcement Learning with Model-Agnostic Meta-Learning in Pytorch
MIT License
827 stars 158 forks source link

Loading Pre/Partially-Trained and Visualization #38

Closed kevslinger closed 4 years ago

kevslinger commented 4 years ago

Hello!

Appreciate this repo, I'm learning a lot from it. I trained the halfCheetah, and want to start exploring other environments, but I can't figure out how to restore my trained model / visualize the cheetah. I can see the rewards in TensorBoard perfectly, but want to render the saved policy network to see the trained cheetah in action. I noticed there is no argument for something such as a load path.

Is there a way to do this? How have you been rendering the environment (e.g. the Cheetah GIF in the README?)? Thanks!

schneimo commented 4 years ago

Restoring a model seems not to be implemented at the moment. You have to implement it yourself if you want to reuse it.

To see the trained agent in action see #27

tristandeleu commented 4 years ago

Hi, I have updated the repo with a newer version of the code that now includes a script to test the model. As for visualization, I suggest to use the Monitor wrapper from Gym. This might not be straightforward to implement, but you can have a look at the new test.py script.