Skip to content

[Tests] add recurrent integration coverage#3793

Open
theap06 wants to merge 1 commit into
pytorch:mainfrom
theap06:feat/lstm-lifecycle-integration-test
Open

[Tests] add recurrent integration coverage#3793
theap06 wants to merge 1 commit into
pytorch:mainfrom
theap06:feat/lstm-lifecycle-integration-test

Conversation

@theap06
Copy link
Copy Markdown
Contributor

@theap06 theap06 commented May 24, 2026

Fixes #3746

Summary

Adds a focused integration test for recurrent state handling across trajectory boundaries. The test exercises an LSTM policy with SyncDataCollector on a deterministic environment that terminates mid-batch, verifies is_init propagation, and confirms that recurrent hidden state does not leak across trajectories after the replay-buffer / recurrent-loss-side path.

Complements #3792 (the docs and rnn.py docstring portion of the recurrent-state lifecycle work) with the missing integration-level coverage. Unit-level recurrent paths are already covered in test/modules/test_rnn.py; value-function-side recurrent coverage lives in test/objectives/test_values.py::TestValues::test_gae_recurrent. Neither exercises the full policy → collector → buffer integration this PR fills.

Notes

  • SyncDataCollector is deprecated as of v0.13 in favor of Collector. This PR uses SyncDataCollector to match the wording of the original issue; a trivial follow-up swaps the import when the deprecation lands.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 24, 2026

🔗 Helpful Links

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

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

⚠️ 16 Awaiting Approval

As of commit 598454a with merge base 634979d (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 May 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ PR Title Label Error

PR title must start with a label prefix in brackets (e.g., [BugFix]).

Current title: add recurrent integration coverage

Supported Prefixes (case-sensitive)

Your PR title must start with exactly one of these prefixes:

Prefix Label Applied Example
[BugFix] BugFix [BugFix] Fix memory leak in collector
[Feature] Feature [Feature] Add new optimizer
[Doc] or [Docs] Documentation [Doc] Update installation guide
[Refactor] Refactoring [Refactor] Clean up module imports
[CI] CI [CI] Fix workflow permissions
[Test] or [Tests] Tests [Tests] Add unit tests for buffer
[Environment] or [Environments] Environments [Environments] Add Gymnasium support
[Data] Data [Data] Fix replay buffer sampling
[Performance] or [Perf] Performance [Performance] Optimize tensor ops
[BC-Breaking] bc breaking [BC-Breaking] Remove deprecated API
[Deprecation] Deprecation [Deprecation] Mark old function
[Quality] Quality [Quality] Fix typos and add codespell

Note: Common variations like singular/plural are supported (e.g., [Doc] or [Docs]).

@theap06 theap06 changed the title add recurrent integration coverage [Tests] add recurrent integration coverage May 24, 2026
@github-actions github-actions Bot added the Tests Incomplete or broken unit tests label May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Modules Tests Incomplete or broken unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc] Improve navigability for new contributors

1 participant