habitat-lab icon indicating copy to clipboard operation
habitat-lab copied to clipboard

Move configs folder inside the habitat folder

Open vincentpierre opened this issue 3 years ago • 4 comments

Motivation and Context

Reimplementing changes from #705 with smaller PRs

Trying to make habitat-lab pip installable (again) This first PR is only moving the configs folder to habitat/config, such that we can use the configs inside the habitat package.

Later PRs will modify the setup.py file, ideally we will have two separate packages (habitat-lab and habitat-baselines) each with their own setup.py file, test suites and docs.


With this change, it should now be possible to do the following:

conda create -n $MY_TEST_ENV python=3.7 cmake=3.14.0 -y
conda activate $MY_TEST_ENV

conda install habitat-sim withbullet headless -c conda-forge -c aihabitat -y

pip install git+https://github.com/vincentpierre/habitat-lab@move_configs

export MAGNUM_LOG=quiet 
export HABITAT_SIM_LOG=quiet


python -c "
import gym
import habitat.utils.gym_definitions

env = gym.make('HabitatRenderPick-v0')
obs = env.reset()
print(obs)
done = False
step = 0
while not done:
  print(f'Stepping : {step}')
  step += 1
  _,_, done,_ = env.step(env.action_space.sample())
env.close()
"

This will create the HabitatRenderPick environment without having to clone ANYTHING using only conda and pip. The trick is that the yaml config files will be stored inside the site-package folder (since we are installing in non-editable mode). The data is downloaded and placed in a data folder from where the above commands are ran (be careful where you run it since it will create a data folder). This is a step forward in getting habitat to be more usable. This gives access to our default gym environments without having to clone anything,

vincentpierre avatar Aug 01 '22 18:08 vincentpierre

Possibly add warning here if the config is missing, possibly that because of the change and they should change path accordingly: https://github.com/facebookresearch/habitat-lab/blob/main/habitat/config/default.py#L918

mathfac avatar Aug 02 '22 21:08 mathfac

looks like we wanted to create habitat/configs not habitat/config as in the PR.

I changed it from configs to config to mirror what is done in habitat-baselines and because there already exists a habitat/config folder. Is there a particular reason you prefer configs over config ?

vincentpierre avatar Aug 04 '22 00:08 vincentpierre

Hold until after challenge is released !

vincentpierre avatar Aug 15 '22 17:08 vincentpierre

Probably simpler to merge #922 directly and skip this one.

vincentpierre avatar Sep 20 '22 17:09 vincentpierre