From 6c7d572e1f4682e0f3de7ea977c0df92a02cf0a0 Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Thu, 17 Dec 2020 16:41:42 +0900 Subject: [PATCH] Apply isort --- pl_bolts/models/rl/common/gym_wrappers.py | 6 +++--- pl_bolts/models/rl/dqn_model.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pl_bolts/models/rl/common/gym_wrappers.py b/pl_bolts/models/rl/common/gym_wrappers.py index 7af7cd6243..cbf95bcbdc 100644 --- a/pl_bolts/models/rl/common/gym_wrappers.py +++ b/pl_bolts/models/rl/common/gym_wrappers.py @@ -7,13 +7,13 @@ import numpy as np import torch -from pl_bolts.utils import _OPENCV_AVAILABLE, _GYM_AVAILABLE +from pl_bolts.utils import _GYM_AVAILABLE, _OPENCV_AVAILABLE from pl_bolts.utils.warnings import warn_missing_pkg if _GYM_AVAILABLE: - from gym import Wrapper, ObservationWrapper - from gym import make as gym_make import gym.spaces + from gym import ObservationWrapper, Wrapper + from gym import make as gym_make else: # pragma: no-cover warn_missing_pkg('gym') Wrapper = object diff --git a/pl_bolts/models/rl/dqn_model.py b/pl_bolts/models/rl/dqn_model.py index 0d895c2efa..6f5e958a36 100644 --- a/pl_bolts/models/rl/dqn_model.py +++ b/pl_bolts/models/rl/dqn_model.py @@ -18,11 +18,11 @@ from pl_bolts.datamodules.experience_source import Experience, ExperienceSourceDataset from pl_bolts.losses.rl import dqn_loss from pl_bolts.models.rl.common.agents import ValueAgent +from pl_bolts.models.rl.common.gym_wrappers import make_environment from pl_bolts.models.rl.common.memory import MultiStepBuffer from pl_bolts.models.rl.common.networks import CNN from pl_bolts.utils import _GYM_AVAILABLE from pl_bolts.utils.warnings import warn_missing_pkg -from pl_bolts.models.rl.common.gym_wrappers import make_environment if _GYM_AVAILABLE: from gym import Env