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:
parent
37ffa60d14
commit
bacac6daea
|
@ -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)
|
Loading…
Reference in New Issue
Block a user