Execute greedy algorithm only once
This commit is contained in:
		
							parent
							
								
									5cff3199c6
								
							
						
					
					
						commit
						b8b1fe9368
					
				@ -59,19 +59,17 @@ def script_execution(filenames, greedy, local, iterations=3):
 | 
				
			|||||||
    script = "src/main.py"
 | 
					    script = "src/main.py"
 | 
				
			||||||
    for dataset in filenames:
 | 
					    for dataset in filenames:
 | 
				
			||||||
        print(f"Running on dataset {dataset}")
 | 
					        print(f"Running on dataset {dataset}")
 | 
				
			||||||
        greedy_list = []
 | 
					        greedy_cmd = run(
 | 
				
			||||||
 | 
					            [executable, script, dataset, "greedy"], capture_output=True
 | 
				
			||||||
 | 
					        ).stdout.splitlines()
 | 
				
			||||||
        local_list = []
 | 
					        local_list = []
 | 
				
			||||||
        for _ in range(iterations):
 | 
					        for _ in range(iterations):
 | 
				
			||||||
            greedy_cmd = run(
 | 
					 | 
				
			||||||
                [executable, script, dataset, "greedy"], capture_output=True
 | 
					 | 
				
			||||||
            ).stdout.splitlines()
 | 
					 | 
				
			||||||
            local_cmd = run(
 | 
					            local_cmd = run(
 | 
				
			||||||
                [executable, script, dataset, "local"], capture_output=True
 | 
					                [executable, script, dataset, "local"], capture_output=True
 | 
				
			||||||
            ).stdout.splitlines()
 | 
					            ).stdout.splitlines()
 | 
				
			||||||
            greedy_list.append(greedy_cmd)
 | 
					 | 
				
			||||||
            local_list.append(local_cmd)
 | 
					            local_list.append(local_cmd)
 | 
				
			||||||
        greedy, local = populate_dataframes(
 | 
					        greedy, local = populate_dataframes(
 | 
				
			||||||
            greedy, local, greedy_list, local_list, dataset
 | 
					            greedy, local, greedy_cmd, local_list, dataset
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
    return greedy, local
 | 
					    return greedy, local
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user