- Fine-tuning
- Patch Generation
- Patch Filtering
- Patch Validation
-
Clone repository
git clone https://github.com/PGZXB/MLM4DNN.git
-
Benchmark preparation
- Refer to benchmark/README.md to get our benchmark (i.e.,
$Benchmark_{APR4DNN}$ )
- Refer to benchmark/README.md to get our benchmark (i.e.,
-
Dataset preparation
- Refer to dataset/README.md to get our dataset (i.e.,
$Dataset_{MLM}$ )
- Refer to dataset/README.md to get our dataset (i.e.,
-
Model preparation
- Refer to models/README.md to get our fine-tuned model
-
Main conda env preparation (for component 1,2,3)
- Create:
conda create --name mlm4dnn_main python=3.11.0 - Install libraries for this env
- pytorch 2.1.0
- transformers 4.36.2
- requests 2.31.0
- tqdm 4.66.1
- See mlm4dnn_main_env.yml for details
- Create:
-
PV conda env preparation (for component 4)
- Create:
conda create --name mlm4dnn_pv python=3.6.13 - Install libraries for this env
- keras 2.3.1
- tensorflow 2.1.0
- numpy 1.18.5
- pandas 1.0.5
- scikit-learn 0.23.1
- astunparse 1.6.3
- See mlm4dnn_pv_env.yml for details
- Create:
conda activate mlm4dnn_main
python mlm4dnn.py repro --dnn-train-env-name mlm4dnn_pv --output-dir /path/to/output-
Model Fine-tuning
conda activate mlm4dnn_mainpython mlm4dnn.py train- The log and checkpoints will be saved in models/
-
MLM4DNN Performing
- Create a config file (refer to configs/infill_api_config.json)
- Change
output_dirto new model's
- Change
- To
Repro:python mlm4dnn.py repro ... --infill-api-config-file /path/to/your_config
- Create a config file (refer to configs/infill_api_config.json)
