Skip to content

Commit

Permalink
Merge branch 'main' of github.com:costa-group/grey into main
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcere committed Jul 4, 2024
2 parents e8ff878 + 6d3f1ee commit 6887106
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions grey_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def parse_args():
parser = argparse.ArgumentParser(description="GREEN Project")

parser.add_argument("-s", "--source", type=str, help="local source file name.")
parser.add_argument("-o", "--folder", type=str, help="Dir to store the results.")
parser.add_argument("-o", "--folder", type=str, help="Dir to store the results.", default="/tmp/grey/")
parser.add_argument("-g", "--greedy", action="store_true", help="Enables the greedy algorithm")

args = parser.parse_args()
Expand All @@ -40,7 +40,9 @@ def parse_args():

results = cfg.build_spec_for_blocks()
final_dir = Path(args.folder)

final_dir.mkdir(exist_ok=True, parents=True)

store_sfs_json(results, final_dir)

if args.greedy:
Expand All @@ -52,4 +54,4 @@ def parse_args():
csv_row = generate_statistics_info(solution_found, outcome, time, sfs_dict)
csv_rows.append(csv_row)
df = pd.DataFrame(csv_rows)
df.to_csv("outcome.csv")
df.to_csv("outcome.csv")

0 comments on commit 6887106

Please sign in to comment.