Closed julienroyd closed 2 years ago
@julienroyd I tried to register my environment following your code but i get an error when trying to use vectorized environments
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/ros/.local/lib/python3.8/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 24, in _worker
env = env_fn_wrapper.var()
File "unity_test_vectrorized.py", line 19, in _init
env = gym.make(env_id)
File "/home/ros/.local/lib/python3.8/site-packages/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/home/ros/.local/lib/python3.8/site-packages/gym/envs/registration.py", line 89, in make
spec = self.spec(path)
File "/home/ros/.local/lib/python3.8/site-packages/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: BirdSingleAgentNoStackedNoVisual-v1
This issue has been automatically marked as stale because it has not had activity in the last 28 days. It will be closed in the next 14 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 42 days. If this issue is still valid, please ping a maintainer. Thank you for your contributions.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi,
I am using
gym==0.18.0
andgym-unity==0.23.0
.I know that
gym.make()
is not officially supported byunity_gym
. However, I was wondering why the attributespec
was defined as a@property
ingym_unity/envs/__init__:UnityToGymWrapper
?Having
spec
be a regular attribute rather than a@property
would allow users to register themselves their unity environments and have their ML code simply callgym.make("MyUnityEnv-v0")
for example, like the other RL benchmarks. For exemple, the user could simply implement something as simple as this in the repository containing the environments:unity_env_wrapper.py:
rl_script.py:
Having
spec
being a@property
triggersAttributeError: can't set attribute
ingym/envs/registration.py