Giter VIP home page Giter VIP logo

mbr-exec's Introduction

Natural Language to Code Translation with Execution

Freda Shi, Daniel Fried, Marjan Ghazvininejad, Luke Zettlemoyer, Sida I. Wang

Setup

  1. Download the MBPP, Spider, and NL2Bash datasets to data/ and follow their instructions for necessary preprocessing steps.
  2. Download our collected Codex data. We have included the pre-executed result with the data; see also execution.py if you'd like to execute automatically collected code locally.
  3. Install the conda environment by
conda env create -f env.yml

Run the Selector

Suppose that the collected Codex data is located at data/mbr-exec/, the following code returns the execution accuracy of selected MBPP test split code among 5 samples which are collected with temperature 0.3 (from Codex), using the mbr_exec(ours) method and random seed 0:

from sample_selectors import select_mbpp
select_mbpp(('test', 0.3, 'mbr_exec', 'data/mbr-exec/mbpp/', 5, 0))

See also the code for more details.


License

MIT

mbr-exec's People

Contributors

sidaw avatar

Stargazers

st01cs avatar  avatar António Farinhas avatar  avatar Kamel Alrashedy avatar Fazzie avatar AlfredPros avatar Joel Boehland avatar  avatar Jeremy D avatar Bruno Henrique avatar  avatar nashid avatar NSY avatar Qiguang Chen avatar Feng Chen avatar Yu Zhang avatar 爱可可-爱生活 avatar Zekun Wang avatar Songlin Yang avatar baeseongsu avatar Haofei Yu avatar Tianbao Xie avatar  avatar Kevin avatar Hiroaki Tanaka avatar  avatar  avatar  avatar Freda Shi avatar Jeongwhan Choi avatar Tianyi avatar  avatar Jialong Wu avatar Yuchong Yao avatar  avatar

Watchers

 avatar nashid avatar Arun Sathiya avatar  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.