Skip to content

Commit

Permalink
default value for args.folder
Browse files Browse the repository at this point in the history
  • Loading branch information
tutugordillo committed Jul 4, 2024
1 parent 7b3dd5f commit 6d3f1ee
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 6d3f1ee

Please sign in to comment.