A Local-to-Global Attention Transformer for Code Search.
Tested in Ubuntu 18.04.6
Python 3.6.0
torch 1.10.1
numpy 1.24.4
tqdm 4.65.0
We use the dataset shared by @guxd. You can download this shared dataset from Google Drive and add this dataset folder to /data
. Meanwhile, we offer a sample dataset /data/github
for you to test.
Edit hyper-parameters and settings in configs.py
python train.py --mode train
python train.py --mode eval
Or you can use our trained model /model_save/joint_embed_model_test.h5
(on the sample data set) to test directly.