From 0e8a45a0abe07ea0d018cb6caded4980260f99c3 Mon Sep 17 00:00:00 2001 From: HCBin Date: Thu, 5 Sep 2024 10:13:22 +0800 Subject: [PATCH] Update analyze_logs.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit epoch读取位置不对 --- tools/analysis_tools/analyze_logs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/analysis_tools/analyze_logs.py b/tools/analysis_tools/analyze_logs.py index 926412e27ba..520e48e0863 100755 --- a/tools/analysis_tools/analyze_logs.py +++ b/tools/analysis_tools/analyze_logs.py @@ -177,6 +177,9 @@ def load_json_logs(json_logs): if not len(log) > 1: continue + if 'epoch' in log.keys(): + epoch = log['epoch'] + if epoch not in log_dict: log_dict[epoch] = defaultdict(list) @@ -189,9 +192,6 @@ def load_json_logs(json_logs): else: log_dict[epoch][k].append(v) - if 'epoch' in log.keys(): - epoch = log['epoch'] - return log_dicts