From 81e53efd9c97ab95d3ff2711e902109f591dc39f Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 21 Oct 2022 15:17:39 +0100 Subject: [PATCH] PNG: create output dir if doesn't exist --- aimodel/src/subcommands/train_predict.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aimodel/src/subcommands/train_predict.py b/aimodel/src/subcommands/train_predict.py index cb9fe5e..44ffd51 100644 --- a/aimodel/src/subcommands/train_predict.py +++ b/aimodel/src/subcommands/train_predict.py @@ -88,6 +88,9 @@ def run(args): sys.stderr.write(">>> Complete\n") def do_png(args, ai, dataset, model_code): + if not os.path.exists(args.output): + os.mkdir(os.path.dirname(args.output)) + model_params = json.loads(readfile(args.params)) i = 0