From dcc502022e354ec4024db0423e31ca515ca0460a Mon Sep 17 00:00:00 2001 From: dsctt Date: Mon, 17 Oct 2022 10:03:17 -0400 Subject: [PATCH] Switch to gymnasium from gym --- .../environments/adversarial_pursuit/adversarial_pursuit.py | 2 +- magent2/environments/battle/battle.py | 2 +- magent2/environments/battlefield/battlefield.py | 2 +- magent2/environments/combined_arms/combined_arms.py | 2 +- magent2/environments/gather/gather.py | 2 +- magent2/environments/magent_env.py | 6 +++--- magent2/environments/tiger_deer/tiger_deer.py | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/magent2/environments/adversarial_pursuit/adversarial_pursuit.py b/magent2/environments/adversarial_pursuit/adversarial_pursuit.py index bb56753..1c16115 100644 --- a/magent2/environments/adversarial_pursuit/adversarial_pursuit.py +++ b/magent2/environments/adversarial_pursuit/adversarial_pursuit.py @@ -110,7 +110,7 @@ """ import numpy as np -from gym.utils import EzPickle +from gymnasium.utils import EzPickle from pettingzoo.utils.conversions import parallel_to_aec_wrapper import magent2 diff --git a/magent2/environments/battle/battle.py b/magent2/environments/battle/battle.py index afc2f2a..7e45bef 100644 --- a/magent2/environments/battle/battle.py +++ b/magent2/environments/battle/battle.py @@ -123,7 +123,7 @@ import math import numpy as np -from gym.utils import EzPickle +from gymnasium.utils import EzPickle from pettingzoo.utils.conversions import parallel_to_aec_wrapper import magent2 diff --git a/magent2/environments/battlefield/battlefield.py b/magent2/environments/battlefield/battlefield.py index c890201..9af156d 100644 --- a/magent2/environments/battlefield/battlefield.py +++ b/magent2/environments/battlefield/battlefield.py @@ -125,7 +125,7 @@ import math import numpy as np -from gym.utils import EzPickle +from gymnasium.utils import EzPickle from pettingzoo.utils.conversions import parallel_to_aec_wrapper import magent2 diff --git a/magent2/environments/combined_arms/combined_arms.py b/magent2/environments/combined_arms/combined_arms.py index b971f38..f80f6d7 100644 --- a/magent2/environments/combined_arms/combined_arms.py +++ b/magent2/environments/combined_arms/combined_arms.py @@ -128,7 +128,7 @@ import math import numpy as np -from gym.utils import EzPickle +from gymnasium.utils import EzPickle from pettingzoo.utils.conversions import parallel_to_aec_wrapper import magent2 diff --git a/magent2/environments/gather/gather.py b/magent2/environments/gather/gather.py index 9667eb9..2f721f4 100644 --- a/magent2/environments/gather/gather.py +++ b/magent2/environments/gather/gather.py @@ -112,7 +112,7 @@ """ import numpy as np -from gym.utils import EzPickle +from gymnasium.utils import EzPickle from pettingzoo.utils.conversions import parallel_to_aec_wrapper import magent2 diff --git a/magent2/environments/magent_env.py b/magent2/environments/magent_env.py index d5f38a7..7988bc2 100644 --- a/magent2/environments/magent_env.py +++ b/magent2/environments/magent_env.py @@ -1,6 +1,6 @@ import numpy as np -from gym.spaces import Box, Discrete -from gym.utils import seeding +from gymnasium.spaces import Box, Discrete +from gymnasium.utils import seeding from pettingzoo.utils import wrappers from pettingzoo.utils.env import ParallelEnv @@ -140,7 +140,7 @@ def _calc_state_shape(self): def render(self): if self.render_mode is None: - # gym.logger.WARN( + # gymnasium.logger.WARN( # "You are calling render method without specifying any render mode." # ) return diff --git a/magent2/environments/tiger_deer/tiger_deer.py b/magent2/environments/tiger_deer/tiger_deer.py index 3951de8..ee54ff5 100644 --- a/magent2/environments/tiger_deer/tiger_deer.py +++ b/magent2/environments/tiger_deer/tiger_deer.py @@ -95,7 +95,7 @@ """ import numpy as np -from gym.utils import EzPickle +from gymnasium.utils import EzPickle from pettingzoo.utils.conversions import parallel_to_aec_wrapper import magent2