Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Dec 4, 2024
1 parent 97722ea commit 53a5239
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/test_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,9 @@ def test_habitat(self, envname):
check_env_specs(env)

def test_from_config(self):
import habitat

cfg = habitat.get_config("benchmark/nav/objectnav/objectnav_hssd-hab.yaml")
env = HabitatEnv.from_config(cfg)
check_env_specs(env)
assert isinstance(env, HabitatEnv)
Expand Down
2 changes: 1 addition & 1 deletion torchrl/envs/libs/habitat.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from torchrl._utils import _make_ordinal_device
from torchrl.data.utils import DEVICE_TYPING
from torchrl.envs.common import EnvBase
from torchrl.envs.libs.gym import GymEnv, set_gym_backend, GymWrapper
from torchrl.envs.libs.gym import GymEnv, GymWrapper, set_gym_backend
from torchrl.envs.utils import _classproperty

_has_habitat = importlib.util.find_spec("habitat") is not None
Expand Down

0 comments on commit 53a5239

Please sign in to comment.