Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I use the gym 0.19.0 nut it has wrongs whch says "No registered env with id: halfcheetah-medium-expert-v2" #49

Open
97979797 opened this issue Nov 10, 2023 · 2 comments

Comments

@97979797
Copy link

Traceback (most recent call last):
File "scripts/plan_guided.py", line 26, in
diffusion_experiment = utils.load_diffusion(
File "/home/leon/leon_ws/diffuser-main/diffuser/utils/serialization.py", line 47, in load_diffusion
dataset = dataset_config(seed=seed)
File "/home/leon/leon_ws/diffuser-main/diffuser/utils/config.py", line 65, in call
instance = self._class(*args, **kwargs, **self._dict)
File "/home/leon/leon_ws/diffuser-main/diffuser/datasets/sequence.py", line 22, in init
self.env = env = load_environment(env)
File "/home/leon/leon_ws/diffuser-main/diffuser/datasets/d4rl.py", line 36, in load_environment
wrapped_env = gym.make(name)
File "/home/leon/leon_ws/diffuser-main/gym/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/home/leon/leon_ws/diffuser-main/gym/gym/envs/registration.py", line 89, in make
spec = self.spec(path)
File "/home/leon/leon_ws/diffuser-main/gym/gym/envs/registration.py", line 131, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: halfcheetah-medium-expert-v2

@wen1tao1
Copy link

Traceback (most recent call last): File "scripts/plan_guided.py", line 26, in diffusion_experiment = utils.load_diffusion( File "/home/leon/leon_ws/diffuser-main/diffuser/utils/serialization.py", line 47, in load_diffusion dataset = dataset_config(seed=seed) File "/home/leon/leon_ws/diffuser-main/diffuser/utils/config.py", line 65, in call instance = self._class(*args, **kwargs, **self._dict) File "/home/leon/leon_ws/diffuser-main/diffuser/datasets/sequence.py", line 22, in init self.env = env = load_environment(env) File "/home/leon/leon_ws/diffuser-main/diffuser/datasets/d4rl.py", line 36, in load_environment wrapped_env = gym.make(name) File "/home/leon/leon_ws/diffuser-main/gym/gym/envs/registration.py", line 145, in make return registry.make(id, **kwargs) File "/home/leon/leon_ws/diffuser-main/gym/gym/envs/registration.py", line 89, in make spec = self.spec(path) File "/home/leon/leon_ws/diffuser-main/gym/gym/envs/registration.py", line 131, in spec raise error.UnregisteredEnv('No registered env with id: {}'.format(id)) gym.error.UnregisteredEnv: No registered env with id: halfcheetah-medium-expert-v2

Did you solve this problem?

@HuangDou228
Copy link

HuangDou228 commented May 9, 2024

Hello there,
I have tried modify diffuser/environments/registration.py, in which I added following code in ENVIRONMENT_SPECS=
{ 'id':'halfcheetah-medium-expert-v2', 'entry_point':('diffuser.environments.half_cheetah:HalfCheetahFullObsEnv'), },
This solved the problem of "No registered env with id: halfcheetah-medium-expert-v2".

However, when I run plan_guided.py again, it comes out with new error.
AttributeError: attempted to get missing private attribute '_max_episode_steps'

I hope this method could be helpful to this problem, and also hope someone could fix the new error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants