Code Monkey home page Code Monkey logo

lang2program's Introduction

Introduction

Authors: Kelvin Guu, Panupong (Ice) Pasupat, Evan Zheran Liu, Percy Liang

Source code accompanying our ACL 2017 paper, From Language to Programs: Bridging Reinforcement Learning and Maximum Marginal Likelihood.

Also see:

Setup

First, download the repository and necessary data.

$ git clone https://github.com/kelvinguu/lang2program.git
$ mkdir -p lang2program/data
$ cd lang2program/data
$ wget http://nlp.stanford.edu/data/glove.6B.zip  # GloVe vectors
$ unzip glove.6B.zip -d glove.6B
$ wget https://nlp.stanford.edu/projects/scone/scone.zip  # SCONE dataset
$ unzip scone.zip

The resulting data directory should look like this:

  • data/
    • glove.6B/
    • rlong/

Now, start the project's Docker container (you will need to install Docker). The container has all the required software dependencies installed.

$ cd ..
$ ./launch_docker

This script will download the appropriate Docker image if it is not already on your machine. Downloading the image may take a while.

Inside the container, your Git repository will be mounted at /lang2program. All subsequent instructions in this README should be performed inside the container. To exit the container, type exit, just as you would exit bash.

Training a model

To launch a new training run:

$ cd /lang2program
$ python scripts/main.py configs/rlong/best-scene.txt

To run a different configuration, replace configs/rlong/best-scene.txt with your own config file. See configs/rlong/default-base.txt and configs/rlong/dataset-mixins/scene.txt for reasonable starting points. These files are in HOCON syntax.

On stdout, the script will print out the experiment's ID number.

Data for this experiment will be saved to the directory /lang2program/data/experiments/<experiment_id>, containing the following files:

  • config.txt
    • The config file for this training run
  • checkpoints/
    • TensorFlow checkpoints, saved during training
  • tensorboard/
    • TensorBoard log files
  • codalab.json
    • The results of periodic evaluation are saved here.

Program syntax

See scone.md for more information.

lang2program's People

Contributors

ezliu avatar kelvinguu avatar ppasupat avatar

Watchers

 avatar

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.