-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Support for planners and CEM #384
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature, I love it
LGTM for the implementation, just a few comments before we can land this.
The logic seems to make sense. I'd like to see a test of this too, across mocking and real envs if possible (can be done with SerialEnv, ParallelEnv is paradoxically slower with tests because it takes some time to launch).
|
||
for key in td.keys(): | ||
if key != "action": | ||
assert torch.allclose(td[key], td_copy[key]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't you also test the values of the action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what should i test them for? I'm already testing that they exit and have the right shape but i don't really have any information that could allow to test for the values
Description
This PR adds support for MPC planners and in particular the CEM planner (The cross-entropy method for optimization, Botev et al 2013)
Motivation and Context
Planners are a key component of RL and is needed for methods such as PlaNet and PETS.
Types of changes
What types of changes does your code introduce? Remove all that do not apply:
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!