pip install -r requirements.txt
Please check the path of dataset and output directory before running.
This script is for the policy training step in the paper. The model in this step is the CodeT5 baseline (see baselines/Finetune CodeT5
).
python finetuning.py
This script is for the policy optimizing step in the paper. The model in this step is our PyTester (see results in the folder results
).
python ppo_training.py
This inference script is used for CodeT5 and PyTester models only. For other baseline models, please checkout the folder baselines
.
python inference.py
This evaluation script applies to all the models.
python evaluation.py
-
The processed APPS dataset (train and test sets) and the PyTester model can be accessed here.
-
The MBPP and HumanEval datasets are in the folder
datasets
. -
The baseline result logs and predictions are in the folder
baselines
.
If you use our code or PyTester, please cite our PyTester Paper.
@article{takerngsaksiri2024tdd,
title={TDD Without Tears: Towards Test Case Generation from Requirements through Deep Reinforcement Learning},
author={Takerngsaksiri, Wannita and Charakorn, Rujikorn and Tantithamthavorn, Chakkrit and Li, Yuan-Fang},
journal={arXiv preprint arXiv:2401.07576},
year={2024}
}