Fix scene_dataset being overwritten by episode config - #2234
Open
Functionhx wants to merge 1 commit into
Open
Conversation
In Env.__init__, the simulator's scene_dataset was unconditionally
overwritten with the current episode's scene_dataset_config. For HM3D
InstanceImageNav and other semantic tasks, this broke semantics loading
because the episode data carries a basic scene dataset config
(e.g., 'default' or 'hm3d_basis.scene_dataset_config.json') that lacks
semantic annotation paths, overriding the user's semantic-aware config
(e.g., 'hm3d_annotated_basis.scene_dataset_config.json').
The fix: only use the episode's scene_dataset_config as a fallback when
the simulator config's scene_dataset is still set to its default value
('default'), indicating the user hasn't explicitly configured it.
When the user provides an explicit scene_dataset path, that choice is
now respected.
Fixes facebookresearch#2090
Functionhx
force-pushed
the
fix/scene-dataset-override
branch
from
July 9, 2026 15:35
bded311 to
1a2fc38
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2090
Problem
In
Env.__init__, the simulator'sscene_datasetwas unconditionally overwritten with the current episode'sscene_dataset_config. For HM3D InstanceImageNav and other semantic tasks, this broke semantics loading because the episode data carries a basic scene dataset config (e.g.,"default"orhm3d_basis.scene_dataset_config.json) that lacks semantic annotation paths, overriding the user's semantic-aware config (e.g.,hm3d_annotated_basis.scene_dataset_config.json).Root Cause
The config's
simulator.scene_datasetdefaults to"default"(fromdefault_structured_configs.py). The episode'sscene_dataset_configalso defaults to"default"(fromdataset.py). When a user explicitly setsscene_datasetto a semantic config, the episode loading code would blindly overwrite it, causing the simulator to initialize without semantic annotations.The resulting error manifests as warnings like:
Fix
Only use the episode's
scene_dataset_configas a fallback when the simulator config'sscene_datasetis still set to its default value ("default"), indicating the user hasn't explicitly configured it. When the user provides an explicitscene_datasetpath, that choice is now respected.Change
habitat-lab/habitat/core/env.py: Added a guardif self._config.simulator.scene_dataset == "default":before overriding with the episode's config.Testing
This is a minimal, targeted fix. The existing behavior is preserved when
scene_datasetis"default"(no user override). The only change is that an explicitly configuredscene_datasetis now respected instead of being silently overwritten.