Skip to content
Merged
Changes from all commits
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
8 changes: 8 additions & 0 deletions torchrl/data/replay_buffers/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,14 @@ def extend(self, data: TensorDictBase) -> None:
self._mark_update_entities(index)
return index

# TODO: Workaround for PyTorch nightly regression where compiler can't handle
# method calls on objects returned from _attached_entities_iter()
@torch.compiler.disable()
def _mark_update_entities(self, index: torch.Tensor) -> None:
"""Mark entities as updated with the given index."""
for ent in self._storage._attached_entities_iter():
ent.mark_update(index)

def _empty(self, empty_write_count: bool = True) -> None:
self._cursor = 0
self._current_top_values = []
Expand Down
Loading