From a5f03390ef97628705e63ccd86c3d370d859b12c Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 16 Sep 2022 16:14:30 +0100 Subject: [PATCH] pretrain-plot: handle open w -> r --- aimodel/src/subcommands/pretrain_plot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aimodel/src/subcommands/pretrain_plot.py b/aimodel/src/subcommands/pretrain_plot.py index fd41f92..91ec725 100644 --- a/aimodel/src/subcommands/pretrain_plot.py +++ b/aimodel/src/subcommands/pretrain_plot.py @@ -36,7 +36,7 @@ def run(args): sys.stderr.write(f"\n\n>>> This is TensorFlow {tf.__version__}\n\n\n") embeddings = [] - with handle_open(filepath_input, "w") as handle: + with handle_open(filepath_input, "r") as handle: for line in handle: obj = json.loads(line) embeddings.append(obj["rainfall"]) @@ -46,7 +46,7 @@ def run(args): embeddings = [] - with handle_open(filepath_input, "w") as handle: + with handle_open(filepath_input, "r") as handle: for line in handle: obj = json.loads(line) embeddings.append(obj["water"])