-
Notifications
You must be signed in to change notification settings - Fork 332
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
[BugFix] to_observation_norm now works with keys which are not strings #2045
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/2045
Note: Links to docs will display an error until the docs builds have been completed. ❌ 14 New Failures, 1 Unrelated FailureAs of commit 74071c4 with merge base ee8cafb (): NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job 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. |
# Conflicts: # torchrl/envs/transforms/transforms.py
I took the liberty of making a couple of edits. I paved the way for this with some commented changes, I will leave them here as a suggestion for anyone who'd be interested in implementing that. The next step is to store the tracking values in the tensordict rather than in the transform (we could add an underscore before the key string to indicate that these values are private and should not be returned by collectors for instance) |
Description
Added the _key_str method in the to_observation_norm method of VecNorm. A call to to_observation_norm would have previously given an error, since in the update method, a call is made to _key_str to store the sum argument etc. However, this call was not made in to_observation_norm, resulting in the key not being able to be found in _td.
Are there any tests that need to be updated to reflect this?
I've raised this in issue #2036.
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!