[Doc] Document CatFrames with collectors and image replay buffers - #4229
Open
YeonwooSung wants to merge 1 commit into
Open
[Doc] Document CatFrames with collectors and image replay buffers#4229YeonwooSung wants to merge 1 commit into
YeonwooSung wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/4229
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 3 Cancelled JobsAs of commit ebc3714 with merge base 1d3de3d ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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
Adds a focused Sphinx recipe for using
CatFrameswith a data collector and a replay buffer on images, which was missing from the reference docs.Two legitimate placements are documented and cross-linked:
docs/source/reference/envs_transforms.rst): stateful stacking for the policy, reset /InitTrackerbehavior, anddim=-3for CHW images.docs/source/reference/data_replaybuffers.rst): store unstacked rawpixels, rebuild the stack inrb.sample(), and wire aCollectorthroughextend/sample. Shows bothCatFrames.make_rb_transform_and_samplerand the explicitSliceSamplerform.The recipe also covers why raw uint8 frames are what you store, how the collector's
("collector", "traj_ids")interact with the slice sampler, and the common pitfalls of stacking twice (env and buffer on the same key) or using the vector defaultdim=-1on pixels.Copy-paste snippets use
# doctest: +SKIPwhere gym / pixel rendering is required. TheCatFramesclass docstring now points at both sections.Motivation and Context
Using
CatFramesfor inference was already documented; reconstructing a frame stack when sampling from a replay buffer was not, especially for images (stack dim-3, not the vector default). Visual RL relies on this pattern, and the collector +extend+samplepath is easy to get wrong (double stacking, wrong dim, no time axis).close #2618
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
xin all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!