MCPcopy Create free account
hub / github.com/SpecterOps/DeepPass2 / run_evaluation

Function run_evaluation

test/testDeeppass2.py:210–223  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

208
209
210def 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
225if __name__ =="__main__":
226 run_evaluation("./Dataset/test/test_plain.json")

Callers 1

testDeeppass2.pyFile · 0.85

Calls 3

read_test_dataFunction · 0.85
calculate_metricsFunction · 0.85
save_resultsFunction · 0.85

Tested by

no test coverage detected