edbeeching / godot_rl_agents

An Open Source package that allows video game creators, AI researchers and hobbyists the opportunity to learn complex behaviors for their Non Player Characters or agents
MIT License
942 stars 69 forks source link

Adds resuming and saving model to sb3 example #135

Closed Ivan-267 closed 1 year ago

Ivan-267 commented 1 year ago

Adds the ability to save and load model for resuming training, run inference and save periodic checkpoints with CL arguments.

Limitations of this implementation:

For example, if using the default arguments (no exp dir or name specified), the logs will be saved to: .\logs\sb3\Experiment_1 and checkpoints will be saved to: .\logs\sb3\Experiment_checkpoints

This is just a draft implementation, I welcome your feedback on whether it is sufficient as specified before starting changes to the documentation.

Ivan-267 commented 1 year ago

Nice, looking good! I haven't had time to test it though.

Thanks for the review. I ran a quick test on it in which it worked, but I didn't test every use case in-depth.

Ivan-267 commented 1 year ago

This is great! Maybe we could expose the show_window parameter, in other scripts I have this option as --viz. I think training can be faster if you don't render. (but obviously you can't see the agent's progress)

Otherwise LGTM feel free to merge.

Thank you for the review, I agree. Camera sensors may need --viz when used (I haven't tested them at all yet so I'm not sure about this, also whether they work better with a GPU, which I can't test yet), if they do we can consider adding a help note later to where the argument appears.

Will merge after all tests pass.