From 770df8078f3a86505080f37ec83e512fde315535 Mon Sep 17 00:00:00 2001 From: khylon Date: Sat, 28 Oct 2023 20:04:52 +0800 Subject: [PATCH 1/3] fix streaming track data_export bug --- data_export.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data_export.py b/data_export.py index 39ee6f6a..949a792d 100644 --- a/data_export.py +++ b/data_export.py @@ -103,6 +103,9 @@ def cleaned_run_metric(run_metrics): run_metrics = compute_metrics_all_runs(dataset, dataset_name, results, args.recompute, \ args.sensors, args.search_times, args.private_query, \ neurips23track=track, runbook_path=runbook_path) + results = cleaned_run_metric(run_metrics) + if len(results) > 0: + dfs.append(pd.DataFrame(results)) else: results = load_all_results(dataset_name, neurips23track=track) run_metrics = compute_metrics_all_runs(dataset, dataset_name, results, args.recompute, \ From 16ba2bfa17bb7f1c48c3451e44204ce600c13076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Mon, 30 Oct 2023 08:40:23 +0100 Subject: [PATCH 2/3] Append individually in different branches. --- data_export.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data_export.py b/data_export.py index 949a792d..74410bb6 100644 --- a/data_export.py +++ b/data_export.py @@ -100,19 +100,19 @@ def cleaned_run_metric(run_metrics): 'neurips23/streaming/delete_runbook.yaml', 'neurips23/streaming/final_runbook.yaml']: results = load_all_results(dataset_name, neurips23track=track, runbook_path=runbook_path) - run_metrics = compute_metrics_all_runs(dataset, dataset_name, results, args.recompute, \ + results = compute_metrics_all_runs(dataset, dataset_name, results, args.recompute, \ args.sensors, args.search_times, args.private_query, \ neurips23track=track, runbook_path=runbook_path) - results = cleaned_run_metric(run_metrics) + results = cleaned_run_metric(results) if len(results) > 0: dfs.append(pd.DataFrame(results)) else: results = load_all_results(dataset_name, neurips23track=track) - run_metrics = compute_metrics_all_runs(dataset, dataset_name, results, args.recompute, \ + results = compute_metrics_all_runs(dataset, dataset_name, results, args.recompute, \ args.sensors, args.search_times, args.private_query, neurips23track=track) - results = cleaned_run_metric(run_metrics) - if len(results) > 0: - dfs.append(pd.DataFrame(results)) + results = cleaned_run_metric(results) + if len(results) > 0: + dfs.append(pd.DataFrame(results)) dfs = [e for e in dfs if len(e) > 0] if len(dfs) > 0: data = pd.concat(dfs) From e1f9d9849cbc2ac96e1ad71496c1193524311de6 Mon Sep 17 00:00:00 2001 From: Martin Aumueller Date: Mon, 30 Oct 2023 09:25:02 +0100 Subject: [PATCH 3/3] cleaned up code --- data_export.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/data_export.py b/data_export.py index 74410bb6..6ca533d8 100644 --- a/data_export.py +++ b/data_export.py @@ -94,25 +94,21 @@ def cleaned_run_metric(run_metrics): for dataset_name in datasets: print(f"Looking at track:{track}, dataset:{dataset_name}") dataset = DATASETS[dataset_name]() + runbook_paths = [None] if track == 'streaming': - for runbook_path in ['neurips23/streaming/simple_runbook.yaml', + runbook_paths = ['neurips23/streaming/simple_runbook.yaml', 'neurips23/streaming/clustered_runbook.yaml', 'neurips23/streaming/delete_runbook.yaml', - 'neurips23/streaming/final_runbook.yaml']: - results = load_all_results(dataset_name, neurips23track=track, runbook_path=runbook_path) - results = compute_metrics_all_runs(dataset, dataset_name, results, args.recompute, \ - args.sensors, args.search_times, args.private_query, \ - neurips23track=track, runbook_path=runbook_path) - results = cleaned_run_metric(results) - if len(results) > 0: - dfs.append(pd.DataFrame(results)) - else: - results = load_all_results(dataset_name, neurips23track=track) + 'neurips23/streaming/final_runbook.yaml'] + for runbook_path in runbook_paths: + results = load_all_results(dataset_name, neurips23track=track, runbook_path=runbook_path) results = compute_metrics_all_runs(dataset, dataset_name, results, args.recompute, \ - args.sensors, args.search_times, args.private_query, neurips23track=track) + args.sensors, args.search_times, args.private_query, \ + neurips23track=track, runbook_path=runbook_path) results = cleaned_run_metric(results) if len(results) > 0: dfs.append(pd.DataFrame(results)) + dfs = [e for e in dfs if len(e) > 0] if len(dfs) > 0: data = pd.concat(dfs)