From bacac6daea94addb3807e3bde265685c2ce59766 Mon Sep 17 00:00:00 2001 From: mrq Date: Mon, 20 Feb 2023 20:23:22 +0000 Subject: [PATCH] handled paths that contain spaces because python for whatever god forsaken reason will always split on spaces even if wrapping an argument in quotes --- src/train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/train.py b/src/train.py index 80b243a..941ec5c 100755 --- a/src/train.py +++ b/src/train.py @@ -54,8 +54,9 @@ def train(yaml, launcher='none'): if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument('-opt', type=str, help='Path to option YAML file.', default='../options/train_vit_latent.yml') + parser.add_argument('-opt', type=str, help='Path to option YAML file.', default='../options/train_vit_latent.yml', nargs='+') # ugh parser.add_argument('--launcher', choices=['none', 'pytorch'], default='none', help='job launcher') args = parser.parse_args() + args.opt = " ".join(args.opt) # absolutely disgusting train(args.opt, args.launcher) \ No newline at end of file