Skip to content

Commit

Permalink
amend d4rl
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Nov 29, 2023
1 parent ae10b94 commit 2de0247
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 4 additions & 3 deletions torchrl/data/datasets/d4rl.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ def __init__(
self.name = name
dataset = None

if not from_env and direct_download is None:
self._import_d4rl()
direct_download = not self._has_d4rl

if not direct_download:
if from_env is None:
warnings.warn(
Expand All @@ -169,9 +173,6 @@ def __init__(
from_env = False
self.from_env = from_env

if not from_env and direct_download is None:
self._import_d4rl()
direct_download = not self._has_d4rl
if download and not self._is_downloaded():
if not direct_download:
if terminate_on_end is None:
Expand Down
10 changes: 10 additions & 0 deletions torchrl/data/datasets/minari.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@


class MinariExperienceReplay(TensorDictReplayBuffer):
"""Minari Experience replay dataset.
Args:
dataset_id (str):
batch_size (int):
Keyword Args:
root (Path or str, optional):
download (bool, optional):
"""
def __init__(
self,
dataset_id,
Expand Down

0 comments on commit 2de0247

Please sign in to comment.