Repository navigation
Conversation
A ModuleTransform with observation_spec_transform adds observations to the spec but only ran after steps, so reset outputs lacked them: check_env_specs failed and collectors could not stack the first step with the rest. With observation_spec_transform set, the module now also runs at reset. Transforms without it are unchanged.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/4771
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 2 Unrelated FailuresAs of commit fa8e0ef with merge base df1db3d ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
4 of 6 tasks
A module that reads a key only present after a step, such as reward, now keeps the previous behavior and runs only after steps, instead of raising a KeyError at reset.
Running the module at reset wrote every output into the reset data, so a module that also writes a reward or done entry put a reward computed from the reset observation at the root. At reset the module now reads only its inputs and only its non-reward, non-done outputs are written back.
This was referenced Nov 28, 2026
The reset filter used the parent env's reward and done keys, so a reward key added by the transform's own reward_spec_transform was still written at reset, and inside a RayModuleTransform actor, which has no parent, every output was. Reset now writes only the outputs present in the transformed observation spec, and nothing when there is no parent env.
theap06
marked this pull request as ready for review
November 29, 2026 09:13
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A
ModuleTransformwithobservation_spec_transformnow also runs on reset when every key it reads is in the reset output, so the observations it declares exist from the first step andcheck_env_specsand collectors no longer fail; a module that reads step-only keys such as"reward"still runs only after steps, and its reward and done outputs are never written at reset. Inverse transforms and transforms withoutobservation_spec_transformare unchanged.Motivation and Context
Found while adding a success classifier's prediction to a robosuite env with
ModuleTransform.Stack (merge in this order; #4771, #4772, #4773 and #4799 are independent of each other and each is based on
main, #4774 needs all four):Types of changes
Checklist