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] Make torchrl runnable without functorch and with gym==0.13 #386

Merged
merged 182 commits into from
Oct 28, 2022

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Aug 31, 2022

Description

Ensures backward compatibility with torch 1.10.0 and gym 0.13.
Motivated by projects that work with polymetis.

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

codecov bot commented Oct 28, 2022

Codecov Report

Merging #386 (091f746) into main (0487ea2) will decrease coverage by 0.86%.
The diff coverage is 58.06%.

❗ Current head 091f746 differs from pull request most recent head e87e5f6. Consider uploading reports for the commit e87e5f6 to get more accurate results

@@            Coverage Diff             @@
##             main     #386      +/-   ##
==========================================
- Coverage   87.45%   86.59%   -0.87%     
==========================================
  Files         124      124              
  Lines       22850    23313     +463     
==========================================
+ Hits        19984    20187     +203     
- Misses       2866     3126     +260     
Flag Coverage Δ
linux-cpu 84.97% <56.10%> (-0.89%) ⬇️
linux-gpu 86.33% <55.82%> (-0.92%) ⬇️
linux-outdeps-gpu 75.44% <43.96%> (-0.86%) ⬇️
linux-stable-cpu 84.96% <56.10%> (-0.89%) ⬇️
linux-stable-gpu 86.33% <55.82%> (-0.92%) ⬇️
macos-cpu 84.74% <55.11%> (-0.90%) ⬇️

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

Impacted Files Coverage Δ
torchrl/envs/libs/utils.py 15.87% <0.00%> (-0.26%) ⬇️
torchrl/data/tensordict/utils.py 68.33% <13.04%> (-13.30%) ⬇️
torchrl/objectives/common.py 65.36% <31.32%> (-23.01%) ⬇️
torchrl/data/tensordict/tensordict.py 82.40% <33.33%> (-0.15%) ⬇️
test/test_cost.py 87.65% <37.56%> (-8.65%) ⬇️
torchrl/objectives/utils.py 82.23% <40.00%> (-2.98%) ⬇️
torchrl/modules/models/model_based.py 94.89% <50.00%> (-5.11%) ⬇️
test/_utils_internal.py 71.42% <54.16%> (-23.02%) ⬇️
torchrl/objectives/redq.py 90.52% <66.66%> (-0.88%) ⬇️
test/test_tensordictmodules.py 97.26% <70.73%> (-1.13%) ⬇️
... and 14 more

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

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠞⠁⠈⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣀⣤⣼⡀⠀⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⡏⠀⠈⠹⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠹⡄⠀⠀⣘⣷⠲⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠹⡆⠊⠁⠈⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢹⡀⠀⠀⠸⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⡾⣇⠀⠈⠀⠸⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢀⣠⣤⣄⠀⡇⢸⡄⠀⠀⠀⠻⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣾⠀⠀⠈⢷⡇⢠⣿⣄⣠⠄⠀⠹⡆⠀⠀⠀⠀⠀⠀⠀⢀⣀⠤⠤⢄⡀
⠀⣀⣀⢻⡄⠀⠀⠘⡇⠀⠀⠀⠀⠀⠀⠀⠘⡄⠀⠀⠀⠀⢠⡞⠉⠀⠀⣠⢴⡿
⠸⠋⠉⠙⢿⣤⠤⠀⠹⡀⠀⠀⠀⠀⠀⠀⠀⠹⡀⠀⠀⣰⠋⠉⠀⢀⡼⠛⠉⠀
⣶⢶⣄⡠⠂⠉⠲⣀⣀⣱⡀⠀⠀⠀⠀⠀⠀⠀⢳⠀⣰⠣⡀⠀⣠⡏⠀⠀⠀⠀
⢹⠠⠜⠛⢦⣰⡞⢛⣧⣠⡿⠀⠀⠀⠀⠀⠀⣀⣿⠞⠁⠀⠀⢀⡏⠀⠀⠀⠀⠀
⢸⡄⠀⣀⡤⠈⠉⠉⠉⠉⠀⠀⠀⠀⠀⠠⠞⠉⠀⠀⠀⠀⠀⢸⠁⠀⠀⠀⠀⠀
⠀⣏⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⡴⠋⠀⠀⠀⠀⠀⠀⠀⢀⡞⠀⠀⠀⠀⠀⠀
⠀⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡜⠁⠀⠀⠀⠀⠀⠀⠀⢀⡟⠀⠀⠀⠀⠀⠀⠀
⠀⠸⡆⠀⠀⠀⠀⠀⠀⠀⠀⢸⠁⠀⠀⠀⠀⠀⠀⠀⠀⡼⠁⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠇⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⣰⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠘⡆⠀⠀⠀⠀⠀⠀⠈⠢⣄⣀⣀⠀⢠⡞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢹⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢠⣇⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠈⣋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
@vmoens vmoens merged commit af104c3 into main Oct 28, 2022
@vmoens vmoens deleted the robohive_compat branch October 28, 2022 16:25
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.

2 participants