Skip to content

[BugFix] Let BatchSubSampler draw the last sub-trajectory window - #4709

Open
jackiectl2 wants to merge 1 commit into
pytorch:mainfrom
jackiectl2:fix-batch-subsampler-last-window-1108
Open

jackiectl2 wants to merge 1 commit into
pytorch:mainfrom
jackiectl2:fix-batch-subsampler-last-window-1108

Conversation

@jackiectl2

Copy link
Copy Markdown
Contributor

Include traj_len - sub_traj_len as a possible start index so every complete sub-trajectory, including the terminal window, can be sampled.

Fixes #4708.

Validation

6 focused TestSubSampler tests passed; both window-coverage regressions fail without the fix. CPU torch 2.14.1 and TensorDict 0.14.2; the optional TorchRL C++ extension is not built. All changed-file pre-commit hooks passed under Python 3.11.

Full trainer suite and GPU training not run.

Signed-off-by: Tianlang (Jackie) Chen <305351710+jackiectl2@users.noreply.github.com>
@pytorch-bot

pytorch-bot Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/4709

Note: Links to docs will display an error until the docs builds have been completed.

⚠️ 16 Awaiting Approval

As of commit 9192b54 with merge base a711ef9 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BugFix CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Trainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BugFix] Let BatchSubSampler draw the last sub-trajectory window

1 participant