self.root is Path or None + The following packages are already present in the pyproject.toml and will be skipped:
- huggingface-hub If you want to update it to the latest compatible version, you can use `poetry update package`. If you prefer to upgrade it to the latest available version, you can use `poetry add package@latest`. Nothing to add.
This commit is contained in:
@@ -32,7 +32,7 @@ class AbstractExperienceReplay(TensorDictReplayBuffer):
|
||||
):
|
||||
self.dataset_id = dataset_id
|
||||
self.shuffle = shuffle
|
||||
self.root = root
|
||||
self.root = root if root is None else Path(root)
|
||||
storage = self._download_or_load_dataset()
|
||||
|
||||
super().__init__(
|
||||
@@ -98,7 +98,7 @@ class AbstractExperienceReplay(TensorDictReplayBuffer):
|
||||
if self.root is None:
|
||||
self.data_dir = snapshot_download(repo_id=f"cadene/{self.dataset_id}", repo_type="dataset")
|
||||
else:
|
||||
self.data_dir = Path(self.root) / self.dataset_id
|
||||
self.data_dir = self.root / self.dataset_id
|
||||
return TensorStorage(TensorDict.load_memmap(self.data_dir))
|
||||
|
||||
def _compute_stats(self, num_batch=100, batch_size=32):
|
||||
|
||||
Reference in New Issue
Block a user