Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] TensorDictPrimer updates spec instead of overwriting #2332

Merged
merged 8 commits into from
Jul 31, 2024

Conversation

matteobettini
Copy link
Contributor

@matteobettini matteobettini commented Jul 29, 2024

fixes #2331

it also solves the last issue in #2327

Copy link

pytorch-bot bot commented Jul 29, 2024

🔗 Helpful Links

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

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

❌ 4 New Failures, 4 Unrelated Failures

As of commit 50940ee with merge base da89826 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@facebook-github-bot facebook-github-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 Jul 29, 2024
@matteobettini matteobettini marked this pull request as draft July 29, 2024 17:13
Copy link
Contributor

@vmoens vmoens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, can you add a small test in TestTensorDictPrimer?
Just create a TDPrimer and an observation spec with nested specs, and call transform_observation_spec to check that the entries are updated accordingly.

torchrl/envs/transforms/transforms.py Outdated Show resolved Hide resolved
@vmoens vmoens added the bug Something isn't working label Jul 29, 2024
@matteobettini
Copy link
Contributor Author

I added the test

@matteobettini matteobettini marked this pull request as ready for review July 31, 2024 08:19
Copy link
Contributor

@vmoens vmoens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vmoens vmoens merged commit 99332f5 into pytorch:main Jul 31, 2024
67 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] TensorDictPrimer overwrites nested specs in the environemnt
3 participants