https://github.com/amazon-science/cceval
CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completion (NeurIPS 2023)
Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
1 of 5 committers (20.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.5%) to scientific vocabulary
Repository
CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completion (NeurIPS 2023)
Basic Info
- Host: GitHub
- Owner: amazon-science
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://crosscodeeval.github.io/
- Size: 70 MB
Statistics
- Stars: 150
- Watchers: 7
- Forks: 23
- Open Issues: 4
- Releases: 0
Metadata Files
README.md
CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completion
This repository contains the data and inference code of the NeurIPS 2023 (Datasets and Benchmarks track) paper "CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completion."
Requirements
- Uncompress the CrossCodeEval data via
tar -xvJf data/crosscodeeval_data.tar.xz -C data/- The data contains {baseline, retrieval, retrieval w/ ref.} setting x {bm25, UniXCoder, OpenAI Ada} retriever.
- Please email us if you need the raw data.
- Install dependencies via
pip install -r requirements.txt - Build tree sitter via
bash scripts/build_treesitter.sh
Evaluation on CrossCodeEval
Our evaluation consists of two steps: generation and metrics calculation.
Generation
Publicly Available Models
For publicly available models like StarCoder, DeepSeek-Coder, etc., we recommended using vLLM for fast and distributed inference on CrossCodeEval.
bash
export gpus=2
export model=bigcode/starcoder2-3b
export language=python
export task=line_completion_rg1_unixcoder_cosine_sim
export output_dir=./tmp/crosscodeeval_testrun/
python scripts/vllm_inference.py \
--tp $gpus \
--task $task \
--language $language \
--model $model \
--output_dir $output_dir \
--use_crossfile_context
For additional args, e.g., cross-file context length and sampling topp, please see `python vllminference.py --help`.
If you prefer non-vLLM script :: click to expand ::
OpenAI models
OpenAI models are accessible through an API. You may use the following script: ```bash export model=gpt-3.5-turbo-0125 export language=python export task=linecompletionrg1unixcodercosinesim export outputdir=./tmp/crosscodeevalopenaitestrun/ python scripts/openaiinference.py \ --task $task \ --language $language \ --model $model \ --outputdir $outputdir \ --usecrossfile_context
```
Metrics Calculation
After obtaining the generation, we can calculate the final metrics
bash
export language=python
export ts_lib=./build/${language}-lang-parser.so;
export task=line_completion_oracle_unixcoder_cosine_sim
export prompt_file=./data/${language}/${task}.jsonl
export output_dir=./tmp/crosscodeeval_testrun/;
python scripts/eval.py \
--prompt_file $prompt_file \
--output_dir $output_dir \
--ts_lib $ts_lib \
--language $language \
--only_compute_metric
Citation
```
@inproceedings{ding2023crosscodeeval, title={CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completion}, author={Yangruibo Ding and Zijian Wang and Wasi Uddin Ahmad and Hantian Ding and Ming Tan and Nihal Jain and Murali Krishna Ramanathan and Ramesh Nallapati and Parminder Bhatia and Dan Roth and Bing Xiang}, year={2023}, booktitle={Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track}, url={https://arxiv.org/pdf/2310.11248.pdf} } ```
Questions
Please feel free to email us. You may also submit an issue in this repo.
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.
Owner
- Name: Amazon Science
- Login: amazon-science
- Kind: organization
- Website: https://amazon.science
- Twitter: AmazonScience
- Repositories: 80
- Profile: https://github.com/amazon-science
GitHub Events
Total
- Issues event: 4
- Watch event: 34
- Pull request event: 2
- Fork event: 8
Last Year
- Issues event: 4
- Watch event: 34
- Pull request event: 2
- Fork event: 8
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Zijian Wang | z****n@a****m | 10 |
| Zijian Wang | z****g@s****u | 6 |
| Nihal Jain | n****n@g****m | 3 |
| wuahmad | w****d@a****m | 3 |
| Amazon GitHub Automation | 5****o | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 18
- Total pull requests: 7
- Average time to close issues: 9 days
- Average time to close pull requests: about 1 month
- Total issue authors: 14
- Total pull request authors: 4
- Average comments per issue: 2.44
- Average comments per pull request: 0.57
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 5
- Pull requests: 1
- Average time to close issues: 1 day
- Average time to close pull requests: 1 minute
- Issue authors: 5
- Pull request authors: 1
- Average comments per issue: 0.8
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- 18liumin (2)
- ganler (2)
- starlitsky2010 (2)
- madhavatreplit (1)
- anmolagarwal999 (1)
- czq99972 (1)
- AaboutL (1)
- ramsey-coding (1)
- kartikzheng (1)
- leiwen83 (1)
- bsobolev (1)
- njuweicheng (1)
- VulDetect-llm (1)
- zheng5yu9 (1)
- wapleeeeee (1)
Pull Request Authors
- nihaljn (3)
- zijwang (3)
- dependabot[bot] (2)
- wasiahmad (1)