Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Dec 15, 2024
2 parents 5c956bd + 7697613 commit 056e6a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchrl/data/replay_buffers/replay_buffers.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ def _add(self, data):
return index

def _extend(self, data: Sequence) -> torch.Tensor:
is_compiling = is_compiling()
is_comp = is_compiling()
nc = contextlib.nullcontext()
with self._replay_lock if not is_compiling else nc, self._write_lock if not is_compiling else nc:
with self._replay_lock if not is_comp else nc, self._write_lock if not is_comp else nc:
if self.dim_extend > 0:
data = self._transpose(data)
index = self._writer.extend(data)
Expand Down

0 comments on commit 056e6a4

Please sign in to comment.