-
Notifications
You must be signed in to change notification settings - Fork 328
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] example_data
for NonTensor spec
#2698
base: gh/vmoens/67/base
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/2698
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 7 Pending, 4 Unrelated FailuresAs of commit 69c6122 with merge base 256a700 (): NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@kurtamohler I think it would also be useful to have a spec that specified a set of available choices. One solution I'm contemplating is to have a choice = Choice(
torch.stack([
NonTensor("a"),
NonTensor("b"),
NonTensor("c"),
])
)
choice.rand() # gives NonTensorData("a"), for instance Using this you could do choice = Choice(
torch.stack([
Bounded(0, 1),
Bounded(5, 10),
])
)
choice.rand() # gives a tensor with value in [0, 5, 6, 7, 8, 9] |
I like this rl/torchrl/envs/transforms/transforms.py Lines 4418 to 4419 in c5f1565
The only reason that stipulation exists is that when UnaryTransform calls Just a thought--maybe |
Stack from ghstack (oldest at bottom):
example_data
for NonTensor spec #2698