facebookresearch/habitat-lab

original_action_space attribute missing

edwardjjj opened this issue ยท 0 comments

Habitat-Lab and Habitat-Sim versions

Habitat-Lab: v0.3.0
Habitat-Sim: v0.3.0

๐Ÿ› Bug

Creating vector_env of a subclass of RLEnv failed due to a newly added field called original_action_space in the VectorEnv class. This attribute could not be found in the base RLEnv class.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create Custom My inherited from RLEnv

  2. implement make_env_fn

  3. make vector env using the VectorEnv class

Error output:

Traceback (most recent call last):
  File "/home/edward/miniconda3/envs/habitat/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/home/edward/miniconda3/envs/habitat/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/edward/projects/habitat-lab/habitat-lab/habitat/core/vector_env.py", line 279, in _worker_env
    result_or_fn = getattr(env, function_name)
  File "/home/edward/miniconda3/envs/habitat/lib/python3.9/site-packages/gym/core.py", line 229, in __getattr__
    return getattr(self.env, name)
  File "/home/edward/miniconda3/envs/habitat/lib/python3.9/site-packages/gym/core.py", line 229, in __getattr__
    return getattr(self.env, name)
AttributeError: 'MyEnv' object has no attribute 'original_action_space'

Expected behavior

The original_action_space is introduced in v0.3.0, but I don't find any documentation on how to set it.