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

[Refactor] Refactor composite spec keys to match tensordict #956

Merged
merged 5 commits into from
Mar 8, 2023
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
bf
  • Loading branch information
vmoens committed Mar 8, 2023
commit ee3c75255ac6a04d73a3954e951060026d176486
2 changes: 2 additions & 0 deletions torchrl/data/tensor_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,8 @@ def type_check(

def is_in(self, val: Union[dict, TensorDictBase]) -> bool:
for (key, item) in self._specs.items():
if item is None:
continue
if not item.is_in(val.get(key)):
return False
return True
Expand Down