From b75ede5d892951d1b98e0ca7f5b7f321ae84ed16 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 7 Mar 2022 13:26:29 +0100 Subject: [PATCH] Added a default toggle for --imgs / --no-imgs --- caliGraph.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/caliGraph.py b/caliGraph.py index 20bc8fb..4e80385 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -1307,7 +1307,7 @@ def loadWeights(): weights = {"topList": 0.15, "recommender": 0.30, "author": 0.70, "series": 0.05, "tag": 0.05, "pagerank": 0.05, "mu": 0.50, "sigma": 0.30, "bias": 0.25, "median": 0.10} #, "tgb_rank": 0.10} return weights -def cliInterface(): +def cliInterface(imgDef=False): import argparse parser = argparse.ArgumentParser(description='TODO: Write Description.') @@ -1322,7 +1322,10 @@ def cliInterface(): parser.add_argument('--keep-useless-recommenders', action="store_true") parser.add_argument('--dark', action="store_true") parser.add_argument('--v3d', action="store_true") - parser.add_argument('--imgs', action="store_true") + if imgDef: + parser.add_argument('--no-imgs', action="store_true") + else: + parser.add_argument('--imgs', action="store_true") parser.add_argument('--perf-test', action="store_true") parser.add_argument('--train', action="store_true") cmds = parser.add_subparsers(required=True, dest='cmd') @@ -1364,6 +1367,9 @@ def cliInterface(): args = parser.parse_args() + if imgDef: + args.imgs = not args.no_imgs + if args.perf_test: perfTestCLI(args) else: @@ -1461,4 +1467,4 @@ def mainCLI(args): weights = loadWeights() if __name__ == "__main__": - cliInterface() + cliInterface(imgDef=False)