sofa_env icon indicating copy to clipboard operation
sofa_env copied to clipboard

Gym to gymnasium change error

Open saketh2002 opened this issue 1 year ago • 0 comments

The ppo.py file used to run properly until I have changed the files in common folder in sofa_zoo and code in reach_env.py Even though i had installed all the required libraries and the code being in gymnasium (instead of in gym as described in the error) /home/sofa/.local/lib/python3.8/site-packages/stable_baselines3/common/vec_env/patch_gym.py:49: UserWarning: You provided an OpenAI Gym environment. We strongly recommend transitioning to Gymnasium environments. Stable-Baselines3 is automatically wrapping your environments in a compatibility layer, which could potentially cause issues. warnings.warn( Process ForkServerProcess-1: Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/home/sofa/.local/lib/python3.8/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 29, in _worker env = _patch_env(env_fn_wrapper.var()) File "/home/sofa/.local/lib/python3.8/site-packages/stable_baselines3/common/vec_env/patch_gym.py", line 58, in _patch_env return shimmy.GymV26CompatibilityV0(env=env) File "/home/sofa/.local/lib/python3.8/site-packages/shimmy/openai_gym_compatibility.py", line 80, in __init__ self.observation_space = _convert_space(self.gym_env.observation_space) File "/home/sofa/.local/lib/python3.8/site-packages/shimmy/openai_gym_compatibility.py", line 333, in _convert_space raise NotImplementedError( NotImplementedError: Cannot convert space of type Box(-1.0, 1.0, (6,), float32). Please upgrade your code to gymnasium.

saketh2002 avatar Sep 25 '24 01:09 saketh2002