Skip to content
Snippets Groups Projects
Commit e94e6f39 authored by Bhavana Mahendra Jain's avatar Bhavana Mahendra Jain Committed by Oleksandr
Browse files

Check scene paths, minor fix in pointnav generator (#111)

* check scene paths, minor fix in pointnav generator
parent b6a3d649
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ class PointNavDatasetV1(Dataset): ...@@ -35,7 +35,7 @@ class PointNavDatasetV1(Dataset):
def check_config_paths_exist(config: Config) -> bool: def check_config_paths_exist(config: Config) -> bool:
return os.path.exists( return os.path.exists(
config.POINTNAVV1.DATA_PATH.format(split=config.SPLIT) config.POINTNAVV1.DATA_PATH.format(split=config.SPLIT)
) ) and os.path.exists(config.SCENES_DIR)
@staticmethod @staticmethod
def get_scenes_to_load(config: Config) -> List[str]: def get_scenes_to_load(config: Config) -> List[str]:
......
...@@ -141,6 +141,8 @@ def test_pointnav_episode_generator(): ...@@ -141,6 +141,8 @@ def test_pointnav_episode_generator():
config.DATASET.SPLIT = "val" config.DATASET.SPLIT = "val"
config.ENVIRONMENT.MAX_EPISODE_STEPS = 500 config.ENVIRONMENT.MAX_EPISODE_STEPS = 500
config.freeze() config.freeze()
if not PointNavDatasetV1.check_config_paths_exist(config.DATASET):
pytest.skip("Test skipped as dataset files are missing.")
env = habitat.Env(config) env = habitat.Env(config)
env.seed(config.SEED) env.seed(config.SEED)
random.seed(config.SEED) random.seed(config.SEED)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment