Skip to content
Snippets Groups Projects
Commit 1edbeb52 authored by Ananth Mahadevan's avatar Ananth Mahadevan
Browse files

minor formatting

parent 9f7048e3
Branches
No related tags found
No related merge requests found
......@@ -3,9 +3,10 @@ import argparse
from experiments.adversarial_greedy import execute_adversarial_greedy
with open("experiments/adversarial_greedy_alg_config.json",'r') as fp:
with open("experiments/adversarial_greedy_alg_config.json", "r") as fp:
alg_dict = json.load(fp)
def get_args():
parser = argparse.ArgumentParser(
description="Collect results for Adversarial example"
......@@ -14,7 +15,7 @@ def get_args():
"algorithm",
type=str,
help="The algorithm to run with adversarial example",
choices=alg_dict.keys()
choices=alg_dict.keys(),
)
parser.add_argument("--N", type=int, default=100, help="Total number of items")
parser.add_argument(
......@@ -29,10 +30,9 @@ def get_args():
type=str,
default="None",
help="Whether to overwrite or append results",
choices=["None","overwrite","append"]
choices=["None", "overwrite", "append"],
)
args = parser.parse_args()
return args
......@@ -40,5 +40,7 @@ def get_args():
if __name__ == "__main__":
args = get_args()
execute_adversarial_greedy(
args, alg_dict[args.algorithm], overwrite_mode=args.overwrite_mode
)
execute_adversarial_greedy(args,alg_dict[args.algorithm],overwrite_mode=args.overwrite_mode)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment