• Stars
    star
    681
  • Rank 66,346 (Top 2 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created about 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

BabyAI platform. A testbed for training agents to understand and execute language commands.

Build Status

2023 update

All BabyAI environments are now part of the Minigrid library. This repository is not actively maintained.

Training RL agents on Minigrid (and BabyAI) environments can be done using this repository.

This repository still contains scripts which, if adapted to the Minigrid library, could be used to:

BabyAI 1.1

BabyAI is a platform used to study the sample efficiency of grounded language acquisition, created at Mila.

The master branch of this repository is updated frequently. If you are looking to replicate or compare against the baseline results, we recommend you use the BabyAI 1.1 branch and cite both:

@misc{hui2020babyai,
    title={BabyAI 1.1},
    author={David Yu-Tung Hui and Maxime Chevalier-Boisvert and Dzmitry Bahdanau and Yoshua Bengio},
    year={2020},
    eprint={2007.12770},
    archivePrefix={arXiv},
    primaryClass={cs.AI}
}

and the ICLR19 paper, which details the experimental setup and BabyAI 1.0 baseline results. Its source code is in the iclr19 branch:

@inproceedings{
  babyai_iclr19,
  title={Baby{AI}: First Steps Towards Grounded Language Learning With a Human In the Loop},
  author={Maxime Chevalier-Boisvert and Dzmitry Bahdanau and Salem Lahlou and Lucas Willems and Chitwan Saharia and Thien Huu Nguyen and Yoshua Bengio},
  booktitle={International Conference on Learning Representations},
  year={2019},
  url={https://openreview.net/forum?id=rJeXCo0cYX},
}

This README covers instructions for installation and troubleshooting. Other instructions are:

Installation

Conda (Recommended)

If you are using conda, you can create a babyai environment with all the dependencies by running:

git clone https://github.com/mila-iqia/babyai.git
cd babyai
conda env create -f environment.yaml
source activate babyai

After that, execute the following commands to setup the environment.

cd ..
git clone https://github.com/maximecb/gym-minigrid.git
cd gym-minigrid
pip install --editable .

The last command installs the repository in editable mode. Move back to the babyai repository and install that in editable mode as well.

cd ../babyai
pip install --editable .

Finally, follow these instructions

Manual Installation

Requirements:

  • Python 3.6+
  • OpenAI Gym
  • NumPy
  • PyTorch 0.4.1+
  • blosc

First install PyTorch for on your platform.

Then, clone this repository and install the other dependencies with pip3:

git clone https://github.com/mila-iqia/babyai.git
cd babyai
pip3 install --editable .

Finally, follow these instructions

BabyAI Storage Path

Add this line to .bashrc (Linux), or .bash_profile (Mac).

export BABYAI_STORAGE='/<PATH>/<TO>/<BABYAI>/<REPOSITORY>/<PARENT>'

where /<PATH>/<TO>/<BABYAI>/<REPOSITORY>/<PARENT> is the folder where you typed git clone https://github.com/mila-iqia/babyai.git earlier.

Models, logs and demos will be produced in this directory, in the folders models, logs and demos respectively.

Downloading the demos

These can be downloaded here

Ensure the downloaded file has the following md5 checksum (obtained via md5sum): 1df202ef2bbf2de768633059ed8db64c

before extraction:

gunzip -c copydemos.tar.gz | tar xvf -

Using the pixels architecture does not work with imitation learning, because the demonstrations were not generated to use pixels.

Troubleshooting

If you run into error messages relating to OpenAI gym, it may be that the version of those libraries that you have installed is incompatible. You can try upgrading specific libraries with pip3, eg: pip3 install --upgrade gym. If the problem persists, please open an issue on this repository and paste a complete error message, along with some information about your platform (are you running Windows, Mac, Linux? Are you running this on a Mila machine?).

Pixel Observations

Please note that the default observation format is a partially observable view of the environment using a compact encoding, with 3 input values per visible grid cell, 7x7x3 values total. These values are not pixels. If you want to obtain an array of RGB pixels as observations instead, use the RGBImgPartialObsWrapper. You can use it as follows:

import babyai
from gym_minigrid.wrappers import *
env = gym.make('BabyAI-GoToRedBall-v0')
env = RGBImgPartialObsWrapper(env)

This wrapper, as well as other wrappers to change the observation format can be found here.

More Repositories

1

blocks

A Theano framework for building and training neural networks
Python
1,155
star
2

welcome_tutorials

Various tutorials given for welcoming new students at MILA.
Jupyter Notebook
985
star
3

fuel

A data pipeline framework for machine learning
Python
864
star
4

myia

Myia prototyping
Python
455
star
5

summerschool2015

Slides and exercises for the Deep Learning Summer School 2015 programming tutorials
Jupyter Notebook
391
star
6

atari-representation-learning

Code for "Unsupervised State Representation Learning in Atari"
Python
241
star
7

platoon

Multi-GPU mini-framework for Theano
Python
195
star
8

spr

Code for "Data-Efficient Reinforcement Learning with Self-Predictive Representations"
Python
155
star
9

blocks-examples

Examples and scripts using Blocks
Python
147
star
10

summerschool2016

Montrรฉal Deep Learning Summer School 2016 material
Jupyter Notebook
100
star
11

paperoni

Search for scientific papers on the command line
Python
97
star
12

summerschool2017

Material for the Montrรฉal Deep Learning Summer School 2017
Jupyter Notebook
78
star
13

gene-graph-conv

Towards Gene Expression Convolutions using Gene Interaction Graphs
Jupyter Notebook
74
star
14

milatools

Tools to connect to and interact with the Mila cluster
Python
60
star
15

Conscious-Planning

Implementation for paper "A Consciousness-Inspired Planning Agent for Model-Based Reinforcement Learning".
Python
58
star
16

SGI

Official code for "Pretraining Representations For Data-Efficient Reinforcement Learning" (NeurIPS 2021)
Python
51
star
17

ddxplus

Python
48
star
18

picklable-itertools

itertools. But picklable.
Python
38
star
19

climate-cooperation-competition

AI for Global Climate Cooperation: Modeling Global Climate Negotiations, Agreements, and Long-Term Cooperation in RICE-N. ai4climatecoop.org
Python
35
star
20

ivado-mila-dl-school-2019

IVADO/ Mila's Summer Deep Learning School
Jupyter Notebook
35
star
21

ivado-mila-dl-school-2021

Jupyter Notebook
33
star
22

blocks-extras

A collection of extensions to the Blocks framework
Python
27
star
23

DeepDrummer

Making the world a better place through AI-generated beats & grooves
Python
26
star
24

covid_p2p_risk_prediction

COVID19 P2P Risk Prediction Model & Dataset
Python
22
star
25

COVI-AgentSim

Covid-19 spread simulator with human mobility and intervention modeling.
Jupyter Notebook
20
star
26

Skipper

A PyTorch Implementation of Skipper
Python
20
star
27

cookiecutter-pyml

Python
19
star
28

milabench

Repository of machine learning benchmarks
Python
17
star
29

snektalk

Python
15
star
30

dlschool-ivadofr-a18

Ecole Mila/IVADO
Jupyter Notebook
12
star
31

COVI-ML

Risk model training code for Covid-19 tracing application.
Python
12
star
32

teamgrid

Multiagent gridworld for the TEAM project based on gym-minigrid
Python
12
star
33

ivado-mila-dl-school-2019-vancouver

Jupyter Notebook
11
star
34

mila-paper-webpage

Webpage template for MILA-affiliated papers
CSS
11
star
35

dlschool-ivadofr-h18

Ivado ร‰cole d'hiver IVADO/MILA en apprentissage profond 2018
Jupyter Notebook
10
star
36

giving

Reactive logging
Python
9
star
37

training

Python
8
star
38

mila-docs

Mila technical documentation
8
star
39

Casande-RL

Casande-RL
Python
8
star
40

hardpicks

Deep learning dataset and benchmark for first-break detection from hardrock seismic reflection data
Python
7
star
41

ptera

Query and override internal variables in your programs
Python
5
star
42

ResearchTemplate

WIP: Research Template Repository
Python
5
star
43

mila_datamodules

Efficient Datamodules Customized for the Mila / CC clusters
Python
4
star
44

digit-detection

IFT6759 - Advanced projects in machine learning (Door Number Detection project)
Shell
4
star
45

Humanitarian_R-D

Jupyter Notebook
3
star
46

ansible-role-clockwork

Ansible role to install and configure clockwork
Jinja
3
star
47

SARC

FD#11499
Python
3
star
48

ansible-role-cobbler

Install and configure Cobbler service
Jinja
3
star
49

slurm-queue-time-pred

Slurm wait time prediction
Python
3
star
50

diffusion_for_multi_scale_molecular_dynamics

Python
3
star
51

cableinspect-ad-code

Code to prepare data and reproduce results from CableInspect-AD paper
Python
3
star
52

clockwork

Simple metrics to monitor slurm and produce reports.
Python
2
star
53

ansible-role-infiniband

Ansible role to configure InfiniBand interfaces
Jinja
2
star
54

tensorflow_dataloader

1
star
55

bcachefs

C implementation with Python 3.7 bindings of the BCacheFS
C
1
star
56

ansible-collection-proxmox

Ansible Collection to manage containers and virtual machines with Proxmox VE
1
star
57

mila-docs-chatbot

Python
1
star