1
0

handled paths that contain spaces because python for whatever god forsaken reason will always split on spaces even if wrapping an argument in quotes

This commit is contained in:
mrq 2023-02-20 20:23:22 +00:00
parent 37ffa60d14
commit bacac6daea

View File

@ -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)