fix download

This commit is contained in:
Cadene 2024-03-15 13:19:18 +00:00
parent 9c88071bc7
commit b752833f3f
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class AbstractExperienceReplay(TensorDictReplayBuffer):
def _download_or_load_dataset(self) -> torch.StorageBase: def _download_or_load_dataset(self) -> torch.StorageBase:
if self.root is None: if self.root is None:
self.data_dir = snapshot_download(repo_id=f"cadene/{self.dataset_id}", repo_type="dataset") self.data_dir = Path(snapshot_download(repo_id=f"cadene/{self.dataset_id}", repo_type="dataset"))
else: else:
self.data_dir = self.root / self.dataset_id self.data_dir = self.root / self.dataset_id
return TensorStorage(TensorDict.load_memmap(self.data_dir)) return TensorStorage(TensorDict.load_memmap(self.data_dir))