Home

Awesome

[EMNLP 2024]DA-Code: Agent Data Science Code Generation Benchmark for Large Language Models

Overview

<img src="assets/dacode.png" alt="overview" style="width:100%;" />

⚙️ Quickstart

Install Docker

Our agent and experiments need to run in a sandbox environment using Docker, so please follow the instructions in the Docker setup guide to install Docker on your machine.

Install required packages

pip install -r requirements.txt

Set LLM API Key

export AZURE_API_KEY=your_azure_api_key
export AZURE_ENDPOINT=your_azure_endpoint
export OPENAI_API_KEY=your_openai_api_key
export GEMINI_API_KEY=your_genmini_api_key

Run the benchmark

python run.py

Arguments:

Evaluate the benchmark

python evaluate.py \
    --output_dir output/gpt4turbo \
    --gold_dir da_code/gold \
    --eval_json da_code/configs/eval/all.jsonl \
    --result_file results/gpt4.json \
    --timeout_seconds 300

Arguments:

Get Full Dataset

We provide 100 examples of the dataset in the source folder. To get the full dataset, follow the instructions below:

unzip source.zip -d da_code/source
unzip gold.zip -d da_code/gold

BibTex

@misc{huang2024dacodeagentdatascience,
      title={DA-Code: Agent Data Science Code Generation Benchmark for Large Language Models}, 
      author={Yiming Huang and Jianwen Luo and Yan Yu and Yitong Zhang and Fangyu Lei and Yifan Wei and Shizhu He and Lifu Huang and Xiao Liu and Jun Zhao and Kang Liu},
      year={2024},
      eprint={2410.07331},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2410.07331}, 
}