(path)
| 208 | |
| 209 | |
| 210 | def run_evaluation(path): |
| 211 | |
| 212 | test_data_with_preds = read_test_data("evaluation_results/deeppass2/preds_1.json") |
| 213 | performance_bert = calculate_metrics( |
| 214 | test_data_with_preds["cred"], test_data_with_preds["BERT"] |
| 215 | ) |
| 216 | print(f"BERT performance:\n Strict accuracy: {performance_bert}") |
| 217 | save_results("evaluation_results/deeppass2/BERT_performance.json", performance_bert) |
| 218 | |
| 219 | performance_LLM = calculate_metrics( |
| 220 | test_data_with_preds["cred"], test_data_with_preds["LLM"] |
| 221 | ) |
| 222 | print(f"LLM performance:\n {performance_LLM}") |
| 223 | save_results("evaluation_results/deeppass2/LLM_performance.json", performance_LLM) |
| 224 | |
| 225 | if __name__ =="__main__": |
| 226 | run_evaluation("./Dataset/test/test_plain.json") |
no test coverage detected