Skip to content

Error when training with HM3D #89

Description

@iyuner

Hi, thanks for sharing the great work! I tried to reproduce the training process for agents with Habitat on the HM3D dataset. I changed habitat_baselines.evaluate=True to False in config/experiments/vlfm_objectnav_hm3d.yaml (is that correct? do I need to change anything else?). However, I ran into the following error. Does anyone have any idea what might be wrong? Thank you!

....
[05:52:20:041191]:[Assets] ResourceManager.cpp(2210)::loadMaterials : Idx 48:Flat.
[05:52:20:041203]:[Assets] ResourceManager.cpp(2210)::loadMaterials : Idx 49:Flat.
[05:52:20:041216]:[Assets] ResourceManager.cpp(2210)::loadMaterials : Idx 50:Flat.
[05:52:20:041228]:[Assets] ResourceManager.cpp(2210)::loadMaterials : Idx 51:Flat.
[05:52:20:041240]:[Assets] ResourceManager.cpp(2210)::loadMaterials : Idx 52:Flat.
[05:52:20:129431]:[Sim] Simulator.cpp(446)::instanceStageForSceneAttributes : Successfully loaded stage named : ./data/scene_datasets/hm3d/train/00657-TSJmdttd2GV/TSJmdttd2GV.basis.glb
[05:52:20:129535]:[Sim] Simulator.cpp(203)::reconfigure : CreateSceneInstance success == true for active scene name : data/scene_datasets/hm3d/train/00657-TSJmdttd2GV/TSJmdttd2GV.basis.glb  with renderer.
[05:52:20:175509]:[Nav] PathFinder.cpp(571)::build : Building navmesh with 279 x 231 cells
[05:52:20:320075]:[Nav] PathFinder.cpp(845)::build : Created navmesh with 571 vertices 275 polygons
[05:52:20:320151]:[Sim] Simulator.cpp(908)::recomputeNavMesh : reconstruct navmesh successful
2025-08-21 05:52:20,324 Initializing task ObjectNav-v1
2025-08-21 05:52:25,739 agent number of parameters: 0
BLIP2ITMClient.cosine: (480, 640, 3), Seems like there is a potted plant ahead.
Step: 0 | Mode: initialize | Action: 2
BLIP2ITMClient.cosine: (480, 640, 3), Seems like there is a potted plant ahead.
Step: 1 | Mode: initialize | Action: 2
BLIP2ITMClient.cosine: (480, 640, 3), Seems like there is a potted plant ahead.
Step: 2 | Mode: initialize | Action: 2
BLIP2ITMClient.cosine: (480, 640, 3), Seems like there is a potted plant ahead.
Step: 3 | Mode: initialize | Action: 2
BLIP2ITMClient.cosine: (480, 640, 3), Seems like there is a potted plant ahead.
Step: 4 | Mode: initialize | Action: 2
BLIP2ITMClient.cosine: (480, 640, 3), Seems like there is a potted plant ahead.
Step: 5 | Mode: initialize | Action: 2
BLIP2ITMClient.cosine: (480, 640, 3), Seems like there is a potted plant ahead.
Step: 6 | Mode: initialize | Action: 2
Error executing job with overrides: []
Traceback (most recent call last):
  File "/vlfm/run.py", line 55, in main
    execute_exp(cfg, "eval" if cfg.habitat_baselines.evaluate else "train")
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat_baselines/run.py", line 60, in execute_exp
    trainer.train()
  File "~/mambaforge/envs/vlfm2/lib/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat_baselines/rl/ppo/ppo_trainer.py", line 710, in train
    count_steps_delta += self._collect_environment_result(
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat_baselines/rl/ppo/ppo_trainer.py", line 442, in _collect_environment_result
    self._agent.rollouts.insert(
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat_baselines/common/rollout_storage.py", line 150, in insert
    self.buffers.set(
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat_baselines/common/tensor_dict.py", line 238, in set
    dst.set(index, v, strict=strict)
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat_baselines/common/tensor_dict.py", line 241, in set
    dst[index] = self._to_instance(v)
RuntimeError: The expanded size of the tensor (1) must match the existing size (2) at non-singleton dimension 1.  Target sizes: [1, 1, 2].  Tensor sizes: [2, 2]

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Exception ignored in: <function VectorEnv.__del__ at 0x14db308479d0>
Traceback (most recent call last):
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat/core/vector_env.py", line 589, in __del__
    self.close()
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat/core/vector_env.py", line 460, in close
    write_fn((CLOSE_COMMAND, None))
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat/core/vector_env.py", line 129, in __call__
    self.write_fn(data)
  File "~/mambaforge/envs/vlfm2/lib/python3.9/site-packages/habitat/utils/pickle5_multiprocessing.py", line 63, in send
    self.send_bytes(buf.getvalue())
  File "~/mambaforge/envs/vlfm2/lib/python3.9/multiprocessing/connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "~/mambaforge/envs/vlfm2/lib/python3.9/multiprocessing/connection.py", line 411, in _send_bytes
    self._send(header + buf)
  File "~/mambaforge/envs/vlfm2/lib/python3.9/multiprocessing/connection.py", line 368, in _send
    n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions