Skip to content

Shimmy 2.0.0

Latest
Compare
Choose a tag to compare
@pseudo-rnd-thoughts pseudo-rnd-thoughts released this 21 May 09:02
· 5 commits to main since this release
1986692

This release updates Shimmy to support Gymnasium >= 1.0.0a1. Most importantly, this affects how environments are registered using Shimmy and Atari is now removed (don’t worry, ale-py now natively supports Gymnasium so there is just no need for Shimmy to do this anymore).

In Gymnasium < 1.0, python modules could configure themselves to be loaded on import gymnasium removing the need for import shimmy, however, behind the scenes, this caused significant issues. Therefore, the development team took the decision to remove this feature from Gymnasium v1.0. Moving forward, using Shimmy, users must import shimmy for environments to be registered to then be created. For example,

import gymnasium as gym
import shimmy  # this is now necessary

gym.register_envs(shimmy)  # unnecessary but prevents IDEs from complaining

env = gym.make("dm_control/swingup-v0", render_mode="human")

obs, info = env.reset()
episode_over = False
while not episode_over:
	action = policy(obs)  # replace with actual policy
	obs, reward, terminated, truncated, info = env.step(action)
	episode_over = terminated or truncated
env.close()

Full Changelog: v1.3.0...v2.0.0