facebookresearch / habitat-lab

A modular high-level library to train embodied AI agents across a variety of tasks and environments.
https://aihabitat.org/
MIT License
1.81k stars 460 forks source link

Habitat_env_factory `enforce_scenes_greater_eq_environments` not working as expected. #1979

Open lasuomela opened 3 weeks ago

lasuomela commented 3 weeks ago

Habitat-Lab and Habitat-Sim versions

Habitat-Lab: master

Habitat-Sim: master

🐛 Bug

In habitat_env_factory, the functionality provided by enforce_scenes_greater_eq_environments is not working as expected. In cases where the number of environments is greater than number of scenes, habitat_env_factory should return len(scenes) environments with 1 scene per environment. At the moment, the actual return value is len(scenes) environments with len(scenes) +1 scenes per environment. This is caused by incorrect indentation of lines 63-65 in habitat_env_factory. Correct indentation level would be the same as lines 59-62.

Steps to Reproduce

I don't have a self-contained MWE, but on my own codebase I've confirmed changing the indentation fixes the error.

Expected behavior

Additional context