Skip to content

Conversation

@matteobettini
Copy link
Contributor

@matteobettini matteobettini commented Dec 28, 2022

Description

  1. Removed identical set_seed override in _EnvWrapper
  2. Updated type hints in set_seed of EnvBase
  3. Made _init_env() abstract in _EnvWrapper

Motivation and Context

We now enforce inheritors of _EnvWrapper to implement _init_env()

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Remove all that do not apply:

  • Bug fix (non-breaking change which fixes an issue)

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.

I have checked that the tests in test_env.py which I am able to run (without external libraries and cuda) are all passing and linted.

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

codecov bot commented Dec 28, 2022

Codecov Report

Merging #769 (d8fa4f3) into main (c15b056) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #769      +/-   ##
==========================================
+ Coverage   88.72%   88.75%   +0.02%     
==========================================
  Files         123      123              
  Lines       20994    20987       -7     
==========================================
  Hits        18626    18626              
+ Misses       2368     2361       -7     
Flag Coverage Δ
habitat-gpu 24.97% <100.00%> (+0.01%) ⬆️
linux-brax 29.58% <100.00%> (+0.01%) ⬆️
linux-cpu 85.28% <100.00%> (+0.02%) ⬆️
linux-gpu 86.18% <100.00%> (+0.02%) ⬆️
linux-jumanji 30.36% <100.00%> (+0.02%) ⬆️
linux-outdeps-gpu 71.89% <100.00%> (+0.02%) ⬆️
linux-stable-cpu 85.14% <100.00%> (+0.02%) ⬆️
linux-stable-gpu 85.84% <100.00%> (+0.02%) ⬆️
linux_examples-gpu 42.94% <100.00%> (+0.02%) ⬆️
macos-cpu 84.96% <100.00%> (+0.02%) ⬆️
olddeps-gpu 75.93% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
torchrl/envs/common.py 83.33% <100.00%> (+1.46%) ⬆️

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

Copy link
Collaborator

@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 vmoens merged commit 1ce4fc5 into pytorch:main Dec 28, 2022
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