Source code of the paper "Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systems"
Download CSN and COFIC into the datasets
folder. The datasets are available at CSN(python) and COFIC
The HumanAccept dataset is available at HumanAccept
We first generate a dataset for training estimators. The dataset is generated by querying the LCMs with the training dataset.
Please refer to scripts/gen_score.sh
.
An example for starcoder:
bash scripts/gen_score.sh 0 starcoder python
The scripts for training estimators are in the scripts/train_est
folder.
The scripts for evaluating estimators are in scripts/eval_estimators.sh
compute_flops: energy_analysis.py compute_results: eval_estimator.py