From eabb9ac51eb6488f99ce9ac7f2428bbabed28412 Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Thu, 3 Oct 2024 13:41:34 +0200 Subject: [PATCH] properly close model --- .../modelrunner/tensorflow/v2/api020/Tensorflow2Interface.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/bioimage/modelrunner/tensorflow/v2/api020/Tensorflow2Interface.java b/src/main/java/io/bioimage/modelrunner/tensorflow/v2/api020/Tensorflow2Interface.java index bb56000..63ba636 100644 --- a/src/main/java/io/bioimage/modelrunner/tensorflow/v2/api020/Tensorflow2Interface.java +++ b/src/main/java/io/bioimage/modelrunner/tensorflow/v2/api020/Tensorflow2Interface.java @@ -502,16 +502,17 @@ else if (task.status == TaskStatus.FAILED) else if (task.status == TaskStatus.CRASHED) throw new RuntimeException(); this.runner.close(); + this.runner = null; return; } else if (this.interprocessing) { return; } - sig = null; if (model != null) { model.session().close(); model.close(); } model = null; + sig = null; } // TODO make only one