GithubHelp home page GithubHelp logo

vidhijain / transformer_task_planner Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 1.0 201 KB

Code for Transformers are Adaptable Task Planners, CoRL 2022

Home Page: https://sites.google.com/andrew.cmu.edu/ttp/home

Python 100.00%
task-planning replicacad simulation

transformer_task_planner's Introduction

Transformer Task Planner

Vidhi Jain, Yixin Lin, Eric Undersander, Yonatan Bisk and Akshara Rai, Transformers are Adaptable Task Planners, 6th Conference on Robot Learning (CoRL 2022).

OpenReview | Website

Code style: black

Setup

1. Create conda environment

conda env create -f environment.yml

2. Activate conda environment

direnv allow
  • or manually activate
conda activate temporal_task_planner

3. Install PyTorch according to your system requirements.

For example: MacOS installation, cpu only

# MacOS Conda binaries are for x86_64 only, for M1 please use wheels
conda install pytorch -c pytorch

4. Init submodules

git submodule update --init --recursive

5. Build custom habitat-sim

If you are installing habitat-sim for the first time, you might need some additional libraries. Follow instructions from habitat_sim: BUILD_FROM_SOURCE.

cd third_party/habitat-sim
./build.sh --bullet --with-cuda --headless  # this might take a while...
cd -

6. Install temporal_task_planner

pip install -e . 

7. [Optional for sweeps on cluster] Install hydra/launcher submitit slurm

pip install hydra-submitit-launcher --upgrade

8. Add habitat-sim to your python path

export PYTHONPATH=:$PWD/third_party/habitat-sim
echo $PYTHONPATH

9. [Optional if using cuda] Set the CUBLAS CONFIG for fixed seed

export CUBLAS_WORKSPACE_CONFIG=:4096:8

--

Data

1. Kitchen assets

Download from scratch and unzip it:

2. Pre-generated Demonstrations

Session jsons can be downloaded from wandb. Request access by emailing [email protected].

python scripts/data_download.py

This creates artifacts/ folder containing full-view-single-pref:latest and partial-view-single-pref:latest datasets, where each contains train, val and test jsons.


Run

All the files in scripts/ folder can be run as

python scripts/<filename>.py

Scripts 1-3 are dependent on hydra yaml config files.

0. To download data:

python scripts/data_download.py This downloads the latest single preference data for full and partial visibility scenarios.

1. To rollout expert policy:

python scripts/rollout_batch.py You need to provide config parameters like dirpath, session_id_start, session_id_end.

2. To generate session videos:

python scripts/view_batch.py You need to provide config parameters like dirpath, session_id_start, session_id_end.

3. To train the model:

python scripts/learner.py You need to provide config parameters like pick_only, context_history, data_name, data_version

transformer_task_planner's People

Contributors

vidhijain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gangma2610

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.