Skip to content

Commit d7685df

Browse files
committed
Update
[ghstack-poisoned]
1 parent 51be5a9 commit d7685df

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

torchrl/data/datasets/d4rl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ def _get_dataset_direct(self, name, env_kwargs):
279279
# so we need to ensure we're using the gym backend
280280
with set_gym_backend("gym"):
281281
import gym
282+
282283
env = GymWrapper(gym.make(name))
283284
with tempfile.TemporaryDirectory() as tmpdir:
284285
os.environ["D4RL_DATASET_DIR"] = tmpdir
@@ -358,6 +359,7 @@ def _get_dataset_from_env(self, name, env_kwargs):
358359
# so we need to ensure we're using the gym backend
359360
with set_gym_backend("gym"), tempfile.TemporaryDirectory() as tmpdir:
360361
import gym
362+
361363
os.environ["D4RL_DATASET_DIR"] = tmpdir
362364
env = GymWrapper(gym.make(name))
363365
dataset = make_tensordict(

torchrl/envs/transforms/module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# This source code is licensed under the MIT license found in the
44
# LICENSE file in the root directory of this source tree.
5+
from __future__ import annotations
56

67
from collections.abc import Callable
78
from contextlib import nullcontext

0 commit comments

Comments
 (0)