Added a default toggle for --imgs / --no-imgs

This commit is contained in:
Dominik Moritz Roth 2022-03-07 13:26:29 +01:00
parent 84deaa2f64
commit b75ede5d89

View File

@ -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} 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 return weights
def cliInterface(): def cliInterface(imgDef=False):
import argparse import argparse
parser = argparse.ArgumentParser(description='TODO: Write Description.') 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('--keep-useless-recommenders', action="store_true")
parser.add_argument('--dark', action="store_true") parser.add_argument('--dark', action="store_true")
parser.add_argument('--v3d', 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('--perf-test', action="store_true")
parser.add_argument('--train', action="store_true") parser.add_argument('--train', action="store_true")
cmds = parser.add_subparsers(required=True, dest='cmd') cmds = parser.add_subparsers(required=True, dest='cmd')
@ -1364,6 +1367,9 @@ def cliInterface():
args = parser.parse_args() args = parser.parse_args()
if imgDef:
args.imgs = not args.no_imgs
if args.perf_test: if args.perf_test:
perfTestCLI(args) perfTestCLI(args)
else: else:
@ -1461,4 +1467,4 @@ def mainCLI(args):
weights = loadWeights() weights = loadWeights()
if __name__ == "__main__": if __name__ == "__main__":
cliInterface() cliInterface(imgDef=False)