diff --git a/src/execution.py b/src/execution.py index a52cb36..ba28325 100644 --- a/src/execution.py +++ b/src/execution.py @@ -59,19 +59,17 @@ def script_execution(filenames, greedy, local, iterations=3): script = "src/main.py" for dataset in filenames: print(f"Running on dataset {dataset}") - greedy_list = [] + greedy_cmd = run( + [executable, script, dataset, "greedy"], capture_output=True + ).stdout.splitlines() local_list = [] for _ in range(iterations): - greedy_cmd = run( - [executable, script, dataset, "greedy"], capture_output=True - ).stdout.splitlines() local_cmd = run( [executable, script, dataset, "local"], capture_output=True ).stdout.splitlines() - greedy_list.append(greedy_cmd) local_list.append(local_cmd) greedy, local = populate_dataframes( - greedy, local, greedy_list, local_list, dataset + greedy, local, greedy_cmd, local_list, dataset ) return greedy, local