From d4ecef794fd01c17fe47cf672d28bd2a0f007724 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Wed, 16 Feb 2022 13:01:11 +0100 Subject: fix cpe matching example --- examples/cc_cpe_labeling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/cc_cpe_labeling.py b/examples/cc_cpe_labeling.py index 89527bbe..752b8052 100644 --- a/examples/cc_cpe_labeling.py +++ b/examples/cc_cpe_labeling.py @@ -23,7 +23,7 @@ def main(): dset.get_certs_from_web(to_download=True) # Automatically match CPEs and CVEs - dset.compute_cpe_heuristics() + _, cpe_dset, _ = dset.compute_cpe_heuristics() dset.compute_related_cves() # Load dataset of ground truth CPE labels @@ -37,7 +37,7 @@ def main(): # Evaluate CPE matching performance metrics (on validation set) and dump classification report into json y_valid = [(x.heuristics.verified_cpe_matches) for x in validation_certs] - evaluate(validation_certs, y_valid, "./my_debug_dataset/classification_report.json") + evaluate(validation_certs, y_valid, "./my_debug_dataset/classification_report.json", cpe_dset) logger.info(f"{dset.json_path} should now contain fully labeled dataset.") -- cgit v1.3.1