Code Monkey home page Code Monkey logo

crosscodebench's Introduction

CrossCodeBench

Requirements

Our basic experimental environment is Python 3.9.12, PyTorch 1.12.0 and CUDA 11.6.

The list of other requirements can be found in requirements.txt.

Using Instructions

Run main.py to start experiments. All available arguments are located in args.py, specific whatever you need.

Some example scripts are as following.

2-shot PLBART on cat-intra-bf

python main.py \
--init_model plbart \
--use_few_shot \
--num_shots 2 \
--task_split_config cat-intra-bf

2/0-instruct CodeT5-large on sub-inter-c2t, and specific some parameters

python main.py \
--init_model codet5-large \
--use_instruction \
--num_neg_examples 0 \
--task_split_config sub-inter-c2t \
--train_batch_size 16 \
--eval_batch_size 8 \
--num_epochs 1 \
--learning_rate 1e-5 \
--warmup_steps 1000

If you need to run the supervised baselines, use the following scripts

python main.py \
--init_mdoel codet5 \
--supervised \
--task_split_config type-trans

Artifacts

We provide the raw dataset, tasks, meta information and their summaries, which can be downloaded here. Every directory is a dataset and can be parsed into several tasks. The script to load most of the dataset can be found in src/task/utils.py, except ones that need to be pre-process by using other tools such as Java.

Each task corresponds to two Json files, task_{id}_{name}.meta.json and task_{id}_{name}.data.json. The former contains the meta information of the task, while the latter consists of all data instances.

Extract the zip file and place the entire folder within the root directory.

crosscodebench's People

Contributors

nougatca avatar

Stargazers

JIMMY ZHAO avatar Threven avatar James avatar wangxu avatar John avatar Jie avatar Wei Tao avatar

Watchers

 avatar

crosscodebench's Issues

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.