-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[RLlib] APPO accelerate (vol 10): Some torch distribution enhancements. #50440
[RLlib] APPO accelerate (vol 10): Some torch distribution enhancements. #50440
Conversation
Signed-off-by: sven1977 <[email protected]>
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.
@@ -141,7 +143,7 @@ def required_input_dim(space: gym.Space, **kwargs) -> int: | |||
def rsample(self, sample_shape=()): | |||
if self._one_hot is None: | |||
self._one_hot = torch.distributions.one_hot_categorical.OneHotCategorical( | |||
logits=self.logits, probs=self.probs | |||
logits=self.logits, probs=self.probs, validate_args=False |
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.
Interesting. So validation takes a long time? Shall we by time introduce a general configuration argument validate_args
that includes validations in all such methods, like here and in gymnasium, etc.? Such it helps users in finding bugs?
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.
Maybe we should, yeah. Then again, don't want to add too much second-layer/wrapped config args.
I think the ultimate goal should be to try and use torch.distributions
directly (in custom and default RLModules) without the RLlib wrappers.
…s. (ray-project#50440) Signed-off-by: Jay Chia <[email protected]>
…s. (ray-project#50440) Signed-off-by: Jay Chia <[email protected]>
APPO accelerate (vol 10): Some torch distribution enhancements.
Why are these changes needed?
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.