This project fine-tunes the CodeTrans language model.
Clone this repo:
git clone https://github.com/crisdev/finetuning-goprolog.git
and install the dependencies:
pip install -r requirements.txt
Edit the file run.bat
, change model, type and language.
For example:
SET MODEL=SEBIS/code_trans_t5_small_code_documentation_generation_go_multitask_finetune
SET TYPE=MT-TF-S
SET LANGUAGE=go
-
Check the datasets folder to see the available datasets.
-
In a Windows environment execute:
run.cmd
Once the training has finished, models are saved in the models
folder.
This repo provides a script
folder to measure the results.
metrics.py
: for measuring bleu, rouge, and other metrics.words.py
: generates a bar chart of most frequent words used as code comments.
The results given for our experiments can be found in the results folder.