Skip to content

Commit 47579aa

Browse files
authored
[BugFix] Fix unlock in RB (#1135)
1 parent c83d80a commit 47579aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchrl/data/replay_buffers/storages.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ def get(self, index: Union[int, Sequence[int], slice]) -> Any:
276276
out = self._storage[index]
277277
if is_tensor_collection(out):
278278
out = _reset_batch_size(out)
279-
return out.unlock_()
279+
return out.unlock_()
280+
return out
280281

281282
def __len__(self):
282283
return self._len

0 commit comments

Comments
 (0)