Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Nov 21, 2023
1 parent ab88669 commit 7b26175
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensordict/_td.py
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,8 @@ def _set_str(
if not validated:
value = self._validate_value(value, check_shape=True)
if not inplace:
# if self.is_locked:
# raise RuntimeError(_LOCK_ERROR)
if self.is_locked:
raise RuntimeError(_LOCK_ERROR)
self._tensordict[key] = value
else:
try:
Expand Down

0 comments on commit 7b26175

Please sign in to comment.