From b31645bd5d206f73b206fd8713efdb84fa2ed9bd Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 16 Sep 2022 16:24:07 +0100 Subject: [PATCH] pretrain-plot: fix crash; remove water code the model doesn't save the water encoder at this time --- aimodel/src/subcommands/pretrain_plot.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/aimodel/src/subcommands/pretrain_plot.py b/aimodel/src/subcommands/pretrain_plot.py index 91ec725..296e07a 100644 --- a/aimodel/src/subcommands/pretrain_plot.py +++ b/aimodel/src/subcommands/pretrain_plot.py @@ -39,19 +39,19 @@ def run(args): with handle_open(filepath_input, "r") as handle: for line in handle: obj = json.loads(line) - embeddings.append(obj["rainfall"]) + embeddings.append(obj) logger.info(">>> Plotting rainfall with UMAP\n") vis_embeddings(filepath_output_rainfall, np.array(embeddings)) + # the model doesn't save the water encoder at this time + # embeddings = [] + # with handle_open(filepath_input, "r") as handle: + # for line in handle: + # obj = json.loads(line) + # embeddings.append(obj["water"]) - embeddings = [] - with handle_open(filepath_input, "r") as handle: - for line in handle: - obj = json.loads(line) - embeddings.append(obj["water"]) - - logger.info(">>> Plotting water with UMAP\n") - vis_embeddings(filepath_output_water, np.array(embeddings)) + # logger.info(">>> Plotting water with UMAP\n") + # vis_embeddings(filepath_output_water, np.array(embeddings)) sys.stderr.write(">>> Complete\n") \ No newline at end of file