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

[BugFix, CI] Set TD_GET_DEFAULTS_TO_NONE=1 in all CIs #2363

Merged
merged 5 commits into from
Aug 5, 2024
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
Next Next commit
init
  • Loading branch information
vmoens committed Aug 5, 2024
commit 4af379abab5e7a997c4e7f500efa8446a0be7f76
3 changes: 2 additions & 1 deletion torchrl/data/tensor_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4118,10 +4118,11 @@ def type_check(
self._specs[_key].type_check(value[_key], _key)

def is_in(self, val: Union[dict, TensorDictBase]) -> bool:
print(val)
for key, item in self._specs.items():
if item is None or (isinstance(item, CompositeSpec) and item.is_empty()):
continue
val_item = val[key]
val_item = val.get(key, NO_DEFAULT)
if not item.is_in(val_item):
return False
return True
Expand Down
Loading