Skip to content

fioushen/astnn-predict-method-name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use ASTNN To Predict Method Name

How To Run

  1. Machine required:

    • GPU (>= 10GB) (if no, modify train.py and set ASTNN(...use_gpu=False...))
    • 32GB main memory
    • 2GB disk
  2. Download dataset from one of links here:

  3. Extract data directory to the project root, it should contains data/train.json, data/valid.json and data/test.json

  4. Configure environment:

    • python 3.7
    • pytorch 1.3 (newest)
    • pandas
    • gensim
    • javalang (use pip to install)
    • maybe others
  5. Run python ./preprocess_data.py to preprocess data, some hours needed.

  6. Run python ./train.py to train the model. It will train 50 epoch in default, 2-3 hours pre epoch. Model will be saved per epoch.

Hint: if you want to run xxx.py background and print to a file (as a example, xxx.log), use the following command on Linux: nohup python -u xxx.py > xxx.log 2>&1 &

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages