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] Batched environments with non empty batch size #774

Merged
merged 5 commits into from
Dec 31, 2022

Conversation

matteobettini
Copy link
Contributor

This PR fixes BUG #773

@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 Dec 31, 2022
@codecov
Copy link

codecov bot commented Dec 31, 2022

Codecov Report

Merging #774 (01398d8) into main (578938a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 01398d8 differs from pull request most recent head 26b974b. Consider uploading reports for the commit 26b974b to get more accurate results

@@           Coverage Diff           @@
##             main     #774   +/-   ##
=======================================
  Coverage   88.73%   88.73%           
=======================================
  Files         123      123           
  Lines       20986    20987    +1     
=======================================
+ Hits        18622    18623    +1     
  Misses       2364     2364           
Flag Coverage Δ
habitat-gpu 24.97% <0.00%> (-0.01%) ⬇️
linux-brax 29.58% <0.00%> (-0.01%) ⬇️
linux-cpu 85.29% <100.00%> (+0.01%) ⬆️
linux-gpu 86.18% <100.00%> (+<0.01%) ⬆️
linux-jumanji 30.36% <0.00%> (-0.01%) ⬇️
linux-outdeps-gpu 71.91% <100.00%> (+<0.01%) ⬆️
linux-stable-cpu 85.12% <100.00%> (+<0.01%) ⬆️
linux-stable-gpu 85.83% <100.00%> (+0.01%) ⬆️
linux_examples-gpu 42.94% <0.00%> (-0.01%) ⬇️
macos-cpu 84.95% <100.00%> (+<0.01%) ⬆️
olddeps-gpu 75.91% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
torchrl/envs/vec_env.py 69.42% <100.00%> (+0.05%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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 thanks!

@vmoens
Copy link
Contributor

vmoens commented Dec 31, 2022

@matteobettini can I ask you to add a simple test in test_envs.py to test non regression of this feature?

@vmoens vmoens changed the title FIxing #773 [BugFix] Batched environments with non empty batch size Dec 31, 2022
@matteobettini
Copy link
Contributor Author

matteobettini commented Dec 31, 2022

I have added the test. This test should be sufficient for this simple modification.

@vmoens
Copy link
Contributor

vmoens commented Dec 31, 2022

The lint is failing, let's fix this and merge!

@matteobettini
Copy link
Contributor Author

Should be fixed

@vmoens vmoens merged commit e5d60bd into pytorch:main Dec 31, 2022
@matteobettini matteobettini deleted the expand branch January 1, 2023 11:50
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants