From 21a9c0f8a316749f17606da831ef7952957684df Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sun, 23 Jul 2023 11:06:08 +0200 Subject: [PATCH] Fixed Bug leading to infinite recusrion when making mp envs --- fancy_gym/envs/registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fancy_gym/envs/registry.py b/fancy_gym/envs/registry.py index 9e37fcc..abaa295 100644 --- a/fancy_gym/envs/registry.py +++ b/fancy_gym/envs/registry.py @@ -7,7 +7,7 @@ from fancy_gym.utils.make_env_helpers import make_bb from fancy_gym.utils.utils import nested_update from gymnasium import register as gym_register -from gymnasium import gym_make +from gymnasium import make as gym_make from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper @@ -135,7 +135,7 @@ def register_mp(id, mp_wrapper, mp_type, mp_config_override={}): parts = id.split('-') assert len(parts) >= 2 and parts[-1].startswith('v'), 'Malformed env id, must end in -v{int}.' fancy_id = '-'.join(parts[:-1]+[mp_type, parts[-1]]) - register( + gym_register( id=fancy_id, entry_point=bb_env_constructor, kwargs={