Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make_cfg refactoring in examples/tutorial/ #1924

Closed
wants to merge 25 commits into from

Conversation

NakuraMino
Copy link
Contributor

@NakuraMino NakuraMino commented Nov 2, 2022

Motivation and Context

Refactoring make_cfg to use habitat_sim.utils.settings.make_cfg.

How Has This Been Tested

Running python examples/nb_python/*.py for the files that have been modified and checked that all the outputs are equivalent.

Colab files can be tested by inserting the following code block at the very start:

#@title Default title text
# cloning git
!git clone -b refactoring https://github.com/facebookresearch/habitat-sim.git --depth 1
# install CMake
!echo $(git ls-remote https://github.com/facebookresearch/habitat-lab.git HEAD | awk '{ print $1}') > ./hablab_sha
!cat ./hablab_sha
!wget https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh
!wget https://cmake.org/files/v3.20/cmake-3.20.1-linux-x86_64.sh
!sudo mkdir /opt/cmake312
!sudo mkdir /opt/cmake320
!sudo sh ./cmake-3.12.4-Linux-x86_64.sh --prefix=/opt/cmake312 --skip-license
!sudo sh ./cmake-3.20.1-linux-x86_64.sh --prefix=/opt/cmake320 --skip-license
!sudo ln -s /opt/cmake312/bin/cmake /usr/local/bin/cmake

# install deps
!sudo apt-get update || true
!sudo apt-get install -y --no-install-recommends \
    build-essential \
    git \
    curl \
    vim \
    ca-certificates \
    libjpeg-dev \
    libglm-dev \
    libegl1-mesa-dev \
    ninja-build \
    xorg-dev \
    freeglut3-dev \
    pkg-config \
    wget \
    zip \
    lcov\
    libhdf5-dev \
    libomp-dev \
    unzip || true
# Install Headless Chrome dependencies
!sudo apt-get update || true
!sudo apt-get install -yq \
      gconf-service \
      libasound2 \
      libatk1.0-0 \
      libatk-bridge2.0-0 \
      libc6 \
      libcairo2 \
      libcups2 \
      libdbus-1-3  \
      libexpat1 \
      libfontconfig1 \
      libgcc1 \
      libgconf-2-4 \
      libgdk-pixbuf2.0-0 \
      libglib2.0-0 \
      libgtk-3-0 \
      libnspr4 \
      libpango-1.0-0 \
      libpangocairo-1.0-0 \
      libstdc++6 \
      libx11-6 \
      libx11-xcb1 \
      libxcb1 \
      libxcomposite1 \
      libxcursor1 \
      libxdamage1 \
      libxext6 \
      libxfixes3 \
      libxi6 \
      libxrandr2 \
      libxrender1 \
      libxss1 \
      libxtst6 \
      ca-certificates \
      fonts-liberation \
      libappindicator1 \
      libnss3 \
      lsb-release \
      xdg-utils \
      wget

!pip install ninja numpy pytest pytest-cov hypothesis pytest-mock

%cd habitat-sim
!pip install -r requirements.txt --progress-bar off
!pip install imageio imageio-ffmpeg
!git submodule update --init --recursive --jobs 8
!python -u setup.py install --build-type "Release" --lto --headless --vhacd --bullet
!python src_python/habitat_sim/utils/datasets_download.py --uids ci_test_assets --replace --data-path data/

Install habitat_lab:

%cd /content/
!git clone https://github.com/facebookresearch/habitat-lab --depth 1
%cd /content/habitat-lab/
!set +e
!pip install -r ./habitat-lab/requirements.txt
!reqs=(./habitat_baselines/**/requirements.txt)
!pip install "${reqs[@]/#/-r}"
!set -e
!pip install -e habitat-lab

and then follow the instructions mentioned in #1818. Restart runtime, and then run the remaining cells (except for the first one).

!add-apt-repository ppa:ubuntu-toolchain-r/test -y
!apt-get update --fix-missing
!apt-get dist-upgrade

I checked the visual outputs to the colab files are identical to the the colab outputs before the changes.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 2, 2022
@NakuraMino NakuraMino self-assigned this Nov 2, 2022
@NakuraMino NakuraMino changed the title Refactoring Make_cfg refactoring in examples/tutorial/ Nov 3, 2022
@jrreyna jrreyna self-assigned this Nov 29, 2022
@NakuraMino NakuraMino mentioned this pull request Dec 1, 2022
11 tasks
@facebook-github-bot
Copy link
Contributor

Hi @NakuraMino!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@NakuraMino NakuraMino closed this Jul 30, 2023
@jturner65 jturner65 deleted the refactoring branch November 29, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants