pial08/SemVulDet

Running predictions

jeffyjeff2893 opened this issue · 2 comments

Once I train this model and get the model.bin file, how can I run predictions on new pieces of code?

pial08 commented

Sorry for the delayed reply.
Put your data in a jsonl file similar to the data file link I provided, and run the command:

python run.py --output_dir=<output_directory> --model_type=roberta --tokenizer_name=<trained model path> --model_name_or_path=<trained model path> \ --do_test --test_data_file=<test_data_directory> \ --block_size 400 --train_batch_size 512 --eval_batch_size 512 --max_grad_norm 1.0 --evaluate_during_training \ --gnn ReGCN --learning_rate 5e-4 --epoch 100 --hidden_size 512 --num_classes <no of classes> --model_checkpoint <saved_directory> --num_GNN_layers 2 --format uni --window_size 5 \ --seed 123456 2>&1 | tee $logp/training_log.txt

Thanks