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

[RLlib] Add torch compile capabilities to TorchRLModule #34640

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
08a2f7e
Add torch compile to torch RL Module
ArturNiederfahrenhorst Apr 21, 2023
963d2bf
remove spec checks from torch
ArturNiederfahrenhorst Apr 28, 2023
e6432e0
initial
ArturNiederfahrenhorst Apr 28, 2023
4453bc0
wip
ArturNiederfahrenhorst Apr 29, 2023
68e7970
Add torch compile test for breaks encountered by dynamo
ArturNiederfahrenhorst Apr 29, 2023
a98d296
Add test to BUILD
ArturNiederfahrenhorst Apr 29, 2023
ab01b3c
Minor fix
ArturNiederfahrenhorst Apr 29, 2023
13eef89
Merge branch 'master' into removecheckspecsfromdefaultcodepath
ArturNiederfahrenhorst Apr 29, 2023
584f83e
Add only_check_on_retry to tests
ArturNiederfahrenhorst Apr 29, 2023
5cebaf2
typo
ArturNiederfahrenhorst Apr 29, 2023
d46ca5f
Kourosh's suggestions
ArturNiederfahrenhorst Apr 29, 2023
ee0fac4
Add SpecCheckingError
ArturNiederfahrenhorst Apr 30, 2023
76fb4aa
Fix test spec dict and lint
ArturNiederfahrenhorst May 1, 2023
9601e3a
Merge branch 'master' into torchcompilerlmodules
ArturNiederfahrenhorst May 1, 2023
849fa7e
Revert experimental changes
ArturNiederfahrenhorst May 1, 2023
899e1bc
merge removecheckspecsfromdefaultcodepath
ArturNiederfahrenhorst May 1, 2023
e554d35
Merge branch 'master' into removecheckspecsfromdefaultcodepath
ArturNiederfahrenhorst May 1, 2023
571e02f
Sven's comment
ArturNiederfahrenhorst May 1, 2023
6d3ad29
Merge branch 'removecheckspecsfromdefaultcodepath' into torchcompiler…
ArturNiederfahrenhorst May 1, 2023
f0a9200
Remove aot eager backend
ArturNiederfahrenhorst May 1, 2023
53ad1ba
lint
ArturNiederfahrenhorst May 1, 2023
987caa8
wip
ArturNiederfahrenhorst May 1, 2023
80634a5
wip
ArturNiederfahrenhorst May 2, 2023
651ed48
wip
ArturNiederfahrenhorst May 2, 2023
fc86ae3
wip
ArturNiederfahrenhorst May 2, 2023
35da2a0
merge master
ArturNiederfahrenhorst May 2, 2023
a71cad4
wip
ArturNiederfahrenhorst May 2, 2023
0a10f00
merge master
ArturNiederfahrenhorst May 2, 2023
1f5386d
remove state specs from ActorCritcEncoder
ArturNiederfahrenhorst May 2, 2023
2b0e6af
merge master
ArturNiederfahrenhorst May 2, 2023
cf19c45
wip
ArturNiederfahrenhorst May 2, 2023
a912f5f
wip
ArturNiederfahrenhorst May 2, 2023
5eb0f01
Fix compiled methods stuck with olds weights after update on workers
ArturNiederfahrenhorst May 3, 2023
8e71638
wip
ArturNiederfahrenhorst May 5, 2023
4dbfaa5
Merge branch 'master' into torchcompilerlmodules
ArturNiederfahrenhorst May 5, 2023
c7a4164
move action distributions out of forwards
ArturNiederfahrenhorst May 5, 2023
8745439
merge actiondistoutofforwards
ArturNiederfahrenhorst May 5, 2023
a3887ab
docs
ArturNiederfahrenhorst May 5, 2023
35a1ad4
Merge branch 'actiondistoutofforwards' into torchcompilerlmodules
ArturNiederfahrenhorst May 5, 2023
1d7d6d3
wip
ArturNiederfahrenhorst May 5, 2023
f8b3fd3
merge master
ArturNiederfahrenhorst May 5, 2023
b64727a
lint
ArturNiederfahrenhorst May 5, 2023
b8ca1ec
merge actiondistoutofforwards
ArturNiederfahrenhorst May 5, 2023
682eba0
wip
ArturNiederfahrenhorst May 5, 2023
4683f21
merge master
ArturNiederfahrenhorst May 5, 2023
d11dc42
wip
ArturNiederfahrenhorst May 6, 2023
57cf2ac
Merge branch 'master' into actiondistoutofforwards
ArturNiederfahrenhorst May 6, 2023
d933f6b
Fix missing action distribution conversion
ArturNiederfahrenhorst May 6, 2023
cbaf353
Add config compilation to rollout worker
ArturNiederfahrenhorst May 6, 2023
ddd0194
Fix APPOg
ArturNiederfahrenhorst May 6, 2023
56684f9
Merge branch 'actiondistoutofforwards' into torchcompilerlmodules
ArturNiederfahrenhorst May 6, 2023
51d9a89
Fix torch DDP
ArturNiederfahrenhorst May 7, 2023
19f3f3d
Fix torch DDP
ArturNiederfahrenhorst May 7, 2023
f5ce19f
Merge branch 'actiondistoutofforwards' into torchcompilerlmodules
ArturNiederfahrenhorst May 7, 2023
17cdae7
wip
ArturNiederfahrenhorst May 7, 2023
a640838
fix dunder bug
ArturNiederfahrenhorst May 8, 2023
fa34ca4
fix assert
ArturNiederfahrenhorst May 8, 2023
b2a9757
Fix tune issues
ArturNiederfahrenhorst May 8, 2023
400b972
wip
ArturNiederfahrenhorst May 8, 2023
6ef4110
Add reduce overhead mode
ArturNiederfahrenhorst May 9, 2023
d9c4b6c
Merge branch 'master' into removesomespecs
ArturNiederfahrenhorst May 10, 2023
f7c3ef7
wip
ArturNiederfahrenhorst May 10, 2023
795f81e
merge master
ArturNiederfahrenhorst May 10, 2023
0756a55
Cleanup
ArturNiederfahrenhorst May 10, 2023
92d364c
Fix random policy
ArturNiederfahrenhorst May 10, 2023
91c4116
Merge branch 'removesomespecs' into torchcompilerlmodules
ArturNiederfahrenhorst May 10, 2023
d890e9e
more testing
ArturNiederfahrenhorst May 10, 2023
9c328bd
Fix GRU and LSTM
ArturNiederfahrenhorst May 10, 2023
fd40bc0
Merge branch 'removesomespecs' into torchcompilerlmodules
ArturNiederfahrenhorst May 10, 2023
1bcf681
fix cnn test
ArturNiederfahrenhorst May 11, 2023
f18e49a
Merge branch 'removesomespecs' into torchcompilerlmodules
ArturNiederfahrenhorst May 11, 2023
04ffd9e
Fix torch import error
ArturNiederfahrenhorst May 11, 2023
a17433a
merge master
ArturNiederfahrenhorst May 11, 2023
2f1ac0d
Merge branch 'removesomespecs' into torchcompilerlmodules
ArturNiederfahrenhorst May 11, 2023
ab160f7
Add stateful AC encoder
ArturNiederfahrenhorst May 14, 2023
0934530
Stop modifying input tensors
ArturNiederfahrenhorst May 14, 2023
24e2cf7
Don't omdify state dict in stateful AC encoder
ArturNiederfahrenhorst May 14, 2023
9895e67
Minor cleanup
ArturNiederfahrenhorst May 14, 2023
5539a58
Merge branch 'removesomespecs' into torchcompilerlmodules
ArturNiederfahrenhorst May 14, 2023
bfa3fb4
minor change to kick off CI again
ArturNiederfahrenhorst May 15, 2023
66650dc
Merge branch 'removesomespecs' into torchcompilerlmodules
ArturNiederfahrenhorst May 15, 2023
4af1bf8
Kourosh's comments
ArturNiederfahrenhorst May 15, 2023
5106186
Merge branch 'master' into torchcompilerlmodules
ArturNiederfahrenhorst May 15, 2023
4cce6f8
Fix missing returng
ArturNiederfahrenhorst May 15, 2023
463eddb
Merge branch 'removesomespecs' into torchcompilerlmodules
ArturNiederfahrenhorst May 15, 2023
b590f4e
wip
ArturNiederfahrenhorst May 15, 2023
5428dc6
Fix Torch RL Module
ArturNiederfahrenhorst May 15, 2023
38e791d
Add framework warnings
ArturNiederfahrenhorst May 15, 2023
32cb3b4
Random change to kick off CI
ArturNiederfahrenhorst May 15, 2023
36b2fd0
Kourosh's nit
ArturNiederfahrenhorst May 15, 2023
e6f4cf4
fix torch check in torch rl Module
ArturNiederfahrenhorst May 15, 2023
cf7f53f
Merge branch 'removesomespecs' into torchcompilerlmodules
ArturNiederfahrenhorst May 15, 2023
38e50b5
Merge branch 'master' into torchcompilerlmodules
ArturNiederfahrenhorst May 15, 2023
e5d193c
wip
ArturNiederfahrenhorst May 15, 2023
4c48f36
introduce compile_wrapper
ArturNiederfahrenhorst May 15, 2023
8bcdc28
move torch specific code out of learner
ArturNiederfahrenhorst May 16, 2023
aa3a679
fix access to _rl_modules
ArturNiederfahrenhorst May 16, 2023
9916bad
Fix dependency error
ArturNiederfahrenhorst May 16, 2023
816065e
Fix mising torch_compile_cfg
ArturNiederfahrenhorst May 16, 2023
e600710
typo
ArturNiederfahrenhorst May 16, 2023
6a0f260
Merge branch 'master' into torchcompilerlmodules
ArturNiederfahrenhorst May 16, 2023
ff2e10b
Kourosh's comments
ArturNiederfahrenhorst May 16, 2023
ca6b55f
Add cuda test
ArturNiederfahrenhorst May 16, 2023
a9dc1a9
fix from rllib.core.rl_module.torch.torch_compile_config import Torch…
ArturNiederfahrenhorst May 16, 2023
88586bf
Fix TORCH_COMPILE_REQUIRED_VERSION usage
ArturNiederfahrenhorst May 16, 2023
e9f646e
lint
ArturNiederfahrenhorst May 16, 2023
2ad0925
test torch dependency fix
ArturNiederfahrenhorst May 17, 2023
ee55018
Fix TORCH_COMPILE_REQUIRED_VERSION
ArturNiederfahrenhorst May 17, 2023
6026027
Fix torch dependency issue
ArturNiederfahrenhorst May 17, 2023
9efc512
merge master
ArturNiederfahrenhorst May 17, 2023
5def60e
Merge branch 'master' into torchcompilerlmodules
ArturNiederfahrenhorst May 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rllib/core/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_input_specs(self) -> Optional[Spec]:

@override(Model)
def get_output_specs(self) -> Optional[Spec]:
return [ACTOR, CRITIC]
return []

@abc.abstractmethod
def _forward(self, input_dict: dict, **kwargs) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion rllib/core/models/tests/test_cnn_encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TestCNNEncoders(unittest.TestCase):
def test_cnn_encoders(self):
"""Tests building CNN encoders properly and checks for correct architecture."""

# Loop through different combinations of hyperparameters.
# Loop through permutations of hyperparameters.
inputs_dimss = [
[480, 640, 3],
[480, 640, 1],
Expand Down