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
1 parent f78dde4 commit 1d5484a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions torchrl/data/replay_buffers/storages.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(
self.max_size = int(max_size)
self.checkpointer = checkpointer
self._compilable = compilable
self._attached_entities_set = set()
self._attached_entities_list = []

@property
def checkpointer(self):
Expand All @@ -89,10 +89,10 @@ def _is_full(self):
def _attached_entities(self) -> List:
# RBs that use a given instance of Storage should add
# themselves to this set.
_attached_entities_set = getattr(self, "_attached_entities_set", None)
if _attached_entities_set is None:
self._attached_entities_set = _attached_entities_set = []
return _attached_entities_set
_attached_entities_list = getattr(self, "_attached_entities_list", None)
if _attached_entities_list is None:
self._attached_entities_list = _attached_entities_list = []
return _attached_entities_list

@torch._dynamo.assume_constant_result
def _attached_entities_iter(self):
Expand Down

0 comments on commit 1d5484a

Please sign in to comment.