Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Feb 7, 2024
1 parent fe960fa commit 91941ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torchrl/data/replay_buffers/storages.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,8 @@ def _init(self, data: Union[TensorDictBase, torch.Tensor]) -> None:
out = out.expand(self.max_size, *data.shape)
out = out.memmap_like(prefix=self.scratch_dir)
if self.names is not None:
out.names = self.names
names = self.names + [None] * (out.batch_dims - len(self.names))
out.refine_names(*names)
for key, tensor in sorted(
out.items(include_nested=True, leaves_only=True), key=str
):
Expand Down

0 comments on commit 91941ea

Please sign in to comment.