def to_dict():
return {"id": env_id}
if "to_dict" not in dir(env):
env.to_dict = to_dict
if "atari.atari_env" in env.unwrapped.__module__:
to_dict = env.to_dict
env = AtariRescale42x42(env)
env.to_dict = to_dict
After Change
spec = gym.envs.registry.spec(env_id)
env = spec.make(**kwargs)
if not isinstance(env, Environment):
env = Environment(env)
if "atari.atari_env" in env.unwrapped.__module__:
env = AtariRescale42x42(env)
if "wrapper_entry_points" in spec.tags:
for wrapper_entry_point in spec.tags["wrapper_entry_points"]: