Skip to content

Commit 1187fc5

Browse files
Vincent Moensvmoens
authored andcommitted
[BugFix] Fix habitat (#1941)
1 parent 8c506b9 commit 1187fc5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/unittest/linux_libs/scripts_habitat/setup_env.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ pip install pip --upgrade
6565

6666
conda env update --file "${this_dir}/environment.yml" --prune
6767

68-
conda install habitat-sim withbullet headless -c conda-forge -c aihabitat-nightly -y
69-
conda run python -m pip install git+https://github.com/facebookresearch/habitat-lab.git#subdirectory=habitat-lab
68+
#conda install habitat-sim withbullet headless -c conda-forge -c aihabitat -y
69+
conda install habitat-sim withbullet headless -c conda-forge -c aihabitat -y
70+
conda run python -m pip install git+https://github.com/facebookresearch/habitat-lab.git@stable#subdirectory=habitat-lab
7071
#conda run python -m pip install git+https://github.com/facebookresearch/habitat-lab.git#subdirectory=habitat-baselines
7172
conda run python -m pip install "gym[atari,accept-rom-license]" pygame

test/test_env.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ def test_mb_env_batch_lock(self, device, seed=0):
346346
mb_env.step(td)
347347

348348
with pytest.raises(
349-
RuntimeError, match=re.escape("Expected a tensordict with shape==env.batch_size")
349+
RuntimeError,
350+
match=re.escape("Expected a tensordict with shape==env.batch_size"),
350351
):
351352
mb_env.step(td_expanded)
352353

torchrl/envs/libs/habitat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def __init__(self, env_name, **kwargs):
102102
device_num = torch.device(kwargs.pop("device", 0)).index
103103
kwargs["override_options"] = [
104104
f"habitat.simulator.habitat_sim_v0.gpu_device_id={device_num}",
105+
"habitat.simulator.concur_render=False",
105106
]
106107
super().__init__(env_name=env_name, **kwargs)
107108

0 commit comments

Comments
 (0)