-
Notifications
You must be signed in to change notification settings - Fork 554
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
Features/openai hacks #35
base: master
Are you sure you want to change the base?
Conversation
…ork on pusher and pick and place (probably slider too but didnt test) 1. Online observation normalization and clipping 2. Adding additional loss term penalizing large preactivations in the policy network 3. Clipping Q-values in the Q network to stay within semantic return bounds
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.
LGTM! Would you mind making a few changes before I merge it in?
@@ -4,7 +4,7 @@ | |||
import numpy as np | |||
|
|||
|
|||
class GaussianAndEpislonStrategy(RawExplorationStrategy, Serializable): |
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.
Thanks for this fix!
rlkit/torch/networks.py
Outdated
self.composite_normalizer = composite_normalizer | ||
|
||
def forward(self, obs, **kwargs): | ||
if self.composite_normalizer: |
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.
This check seems a bit redundant given the assert statement in __init__
.
rlkit/torch/networks.py
Outdated
def __init__( | ||
self, | ||
*args, | ||
composite_normalizer: CompositeNormalizer = None, |
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.
Seems like we can just make this a required argument rather than kwarg.
rlkit/torch/td3/td3.py
Outdated
if self.clip_q: | ||
target_q_values = torch.clamp( | ||
target_q_values, | ||
-1/(1-self.discount), |
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.
Can you make this a parameter rather than hard-coding it? It could be something like:
if max_q_value is None:
max_q_value = -1/(1-self.discount) # for HER sparse rewards.
in __init__
.
…to features/openai-hacks
I changed it to clip the networks instead, this should be easier. |
Sorry for the delay...
These are the changes for successful pushing/pick and place in state space + typo in gaussian epsilon
I tried to cleanup the commit history with git rebase -i ec231e7 but it's behaving strangely; after I run that command, it pulls a much longer history of the commits, including some from the main branch.