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

[Feature] Jumanji envs #674

Merged
merged 49 commits into from
Nov 19, 2022
Merged

[Feature] Jumanji envs #674

merged 49 commits into from
Nov 19, 2022

Conversation

yingchenlin
Copy link
Contributor

Description

  • Built spec for Jumanji state.
  • Convert data between Torch RL TensorDict and Jumaji state.
  • Add support for seeding.
  • Allow multi-dimensional batch_size.

@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 Nov 14, 2022
# Conflicts:
#	test/_utils_internal.py
#	torchrl/data/tensor_specs.py
#	torchrl/envs/gym_like.py
#	torchrl/envs/transforms/transforms.py
@vmoens vmoens added the enhancement New feature or request label Nov 18, 2022
# Conflicts:
#	.circleci/config.yml
#	docs/source/reference/envs.rst
@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Merging #674 (4a56a86) into main (26881b3) will increase coverage by 0.11%.
The diff coverage is 90.85%.

@@            Coverage Diff             @@
##             main     #674      +/-   ##
==========================================
+ Coverage   87.78%   87.90%   +0.11%     
==========================================
  Files         119      120       +1     
  Lines       20201    20491     +290     
==========================================
+ Hits        17733    18012     +279     
- Misses       2468     2479      +11     
Flag Coverage Δ
habitat-gpu 24.08% <18.47%> (-0.14%) ⬇️
linux-cpu 84.71% <27.76%> (-0.83%) ⬇️
linux-gpu 85.60% <27.76%> (-0.85%) ⬇️
linux-jumanji 29.07% <89.80%> (?)
linux-outdeps-gpu 72.05% <20.50%> (-0.76%) ⬇️
linux-stable-cpu 84.56% <27.76%> (-0.83%) ⬇️
linux-stable-gpu 85.27% <27.76%> (-0.84%) ⬇️
macos-cpu 84.38% <26.49%> (-0.88%) ⬇️
olddeps-gpu 74.34% <26.49%> (-0.74%) ⬇️

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

Impacted Files Coverage Δ
torchrl/envs/libs/gym.py 80.71% <ø> (ø)
torchrl/data/tensor_specs.py 84.72% <69.23%> (+1.74%) ⬆️
torchrl/envs/libs/jumanji.py 90.43% <90.43%> (ø)
test/_utils_internal.py 89.74% <93.75%> (+3.49%) ⬆️
test/test_libs.py 96.30% <94.52%> (-0.68%) ⬇️
test/test_collector.py 98.63% <100.00%> (+<0.01%) ⬆️
torchrl/envs/common.py 83.64% <100.00%> (ø)

📣 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.

Just a couple of comments

torchrl/envs/libs/jumanji.py Outdated Show resolved Hide resolved
torchrl/envs/libs/jumanji.py Outdated Show resolved Hide resolved
torchrl/envs/libs/jumanji.py Outdated Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
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.

Great stuff! A huge plus for the library!

@vmoens vmoens merged commit f5d98af into pytorch:main Nov 19, 2022
vmoens added a commit that referenced this pull request Nov 23, 2022
* amend

* [BugFix] ConvNet forward method with tensors of more than 4 dimensions (#686)

* cnn forward fix

* more general code

* cnn testing

* precommit run check

* convnet tests

* [Feature] add `standard_normal` for RewardScaling (#682)

* Add standard_normal

* give attribute access

* Update standard_normal

* Update tests

* Fix tests

* Address in-place scaling of reward

* Improvise tests

* [Feature] Jumanji envs (#674)

* amend

* [Feature] Default collate_fn (#688)

* init

* amend

* amend

* [BugFix] Fix Examples (#687)

* amend

* [Refactoring] Replace direct gym version checks with decorated functions (#691)

* [Refactoring] Replace gym version checking with decorated functions (#)

Initial commit. Only tests.

* Refactoring in gym.py

* More refactoring in gym.py

* Completed refactoring

* amend

* amend

* Version 0.0.3 (#696)

* [Docs] Host TensorDict docs inside TorchRL docs (#693)

* Pull tensordict docs into TorchRL docs

* Add banner for tensordict docs

* [BugFix] Fix docs build (#698)

* [BugFix] Proper error messages for orphan transform creation (#697)

* amend

* [Feature] Append, init and insert transforms in ReplayBuffer (#695)

* lint

Co-authored-by: albertbou92 <albertbou92@users.noreply.github.com>
Co-authored-by: Aditya Gandhamal <61016383+adityagandhamal@users.noreply.github.com>
Co-authored-by: yingchenlin <yc.jon.lin@gmail.com>
Co-authored-by: Sergey Ordinskiy <113687736+ordinskiy@users.noreply.github.com>
Co-authored-by: Tom Begley <tomcbegley@gmail.com>
Co-authored-by: Alan Schelten <alan@schelten.net>
vmoens added a commit that referenced this pull request Jan 5, 2023
* init

* tests1

* run examples in tests

* [Feature] MPPI Planner (#694)

* amend

* [BugFix] ConvNet forward method with tensors of more than 4 dimensions (#686)

* cnn forward fix

* more general code

* cnn testing

* precommit run check

* convnet tests

* [Feature] add `standard_normal` for RewardScaling (#682)

* Add standard_normal

* give attribute access

* Update standard_normal

* Update tests

* Fix tests

* Address in-place scaling of reward

* Improvise tests

* [Feature] Jumanji envs (#674)

* amend

* [Feature] Default collate_fn (#688)

* init

* amend

* amend

* [BugFix] Fix Examples (#687)

* amend

* [Refactoring] Replace direct gym version checks with decorated functions (#691)

* [Refactoring] Replace gym version checking with decorated functions (#)

Initial commit. Only tests.

* Refactoring in gym.py

* More refactoring in gym.py

* Completed refactoring

* amend

* amend

* Version 0.0.3 (#696)

* [Docs] Host TensorDict docs inside TorchRL docs (#693)

* Pull tensordict docs into TorchRL docs

* Add banner for tensordict docs

* [BugFix] Fix docs build (#698)

* [BugFix] Proper error messages for orphan transform creation (#697)

* amend

* [Feature] Append, init and insert transforms in ReplayBuffer (#695)

* lint

Co-authored-by: albertbou92 <albertbou92@users.noreply.github.com>
Co-authored-by: Aditya Gandhamal <61016383+adityagandhamal@users.noreply.github.com>
Co-authored-by: yingchenlin <yc.jon.lin@gmail.com>
Co-authored-by: Sergey Ordinskiy <113687736+ordinskiy@users.noreply.github.com>
Co-authored-by: Tom Begley <tomcbegley@gmail.com>
Co-authored-by: Alan Schelten <alan@schelten.net>

* lint

Co-authored-by: albertbou92 <albertbou92@users.noreply.github.com>
Co-authored-by: Aditya Gandhamal <61016383+adityagandhamal@users.noreply.github.com>
Co-authored-by: yingchenlin <yc.jon.lin@gmail.com>
Co-authored-by: Sergey Ordinskiy <113687736+ordinskiy@users.noreply.github.com>
Co-authored-by: Tom Begley <tomcbegley@gmail.com>
Co-authored-by: Alan Schelten <alan@schelten.net>
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. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants