[Tests] add recurrent integration coverage#3793
Open
theap06 wants to merge 1 commit into
Open
Conversation
🔗 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.
|
Contributor
|
| 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]).
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.
Fixes #3746
Summary
Adds a focused integration test for recurrent state handling across trajectory boundaries. The test exercises an LSTM policy with
SyncDataCollectoron a deterministic environment that terminates mid-batch, verifiesis_initpropagation, 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.pydocstring portion of the recurrent-state lifecycle work) with the missing integration-level coverage. Unit-level recurrent paths are already covered intest/modules/test_rnn.py; value-function-side recurrent coverage lives intest/objectives/test_values.py::TestValues::test_gae_recurrent. Neither exercises the full policy → collector → buffer integration this PR fills.Notes
SyncDataCollectoris deprecated as of v0.13 in favor ofCollector. This PR usesSyncDataCollectorto match the wording of the original issue; a trivial follow-up swaps the import when the deprecation lands.