From 50ebbb3c04961732c9c0b9932fce714b99de25d4 Mon Sep 17 00:00:00 2001 From: Profir-Petru Partachi Date: Mon, 26 Apr 2021 17:36:42 +0300 Subject: [PATCH] Store the accuracy data per project as JSON when manually evaluating. --- Util/sample_links.py | 4 ++++ Util/sample_predictions.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Util/sample_links.py b/Util/sample_links.py index de8ded0..9089c66 100644 --- a/Util/sample_links.py +++ b/Util/sample_links.py @@ -1,3 +1,4 @@ +import json import random import sys import webbrowser as wb @@ -62,3 +63,6 @@ def prompt_user_bool(prompt_msg, default=None, options_map=None): for project in projects: print('The GT accuracy over the sample is %2.3f' % np.mean(hits[project])) + + with open('./gt_accuracy.json', 'w') as f: + f.write(json.dumps(hits)) diff --git a/Util/sample_predictions.py b/Util/sample_predictions.py index 8f48fa8..c038aad 100644 --- a/Util/sample_predictions.py +++ b/Util/sample_predictions.py @@ -1,4 +1,5 @@ import ast +import json import random import webbrowser as wb @@ -63,3 +64,6 @@ for project in projects: print('The GT accuracy over the sample is %2.3f' % np.mean(hits[project])) + + with open('./gt_accuracy.json', 'w') as f: + f.write(json.dumps(hits))