diff --git a/zoo/src/main/java/com/intel/analytics/zoo/pipeline/inference/AbstractInferenceModel.java b/zoo/src/main/java/com/intel/analytics/zoo/pipeline/inference/AbstractInferenceModel.java index 1b4902121f1..c69bb80d161 100644 --- a/zoo/src/main/java/com/intel/analytics/zoo/pipeline/inference/AbstractInferenceModel.java +++ b/zoo/src/main/java/com/intel/analytics/zoo/pipeline/inference/AbstractInferenceModel.java @@ -117,7 +117,7 @@ public void reload(String modelPath, String weightPath) { } public void release() { - release(); + doRelease(); } @Deprecated diff --git a/zoo/src/main/scala/com/intel/analytics/zoo/pipeline/inference/InferenceModel.scala b/zoo/src/main/scala/com/intel/analytics/zoo/pipeline/inference/InferenceModel.scala index f583a9fb7ad..22127794e32 100644 --- a/zoo/src/main/scala/com/intel/analytics/zoo/pipeline/inference/InferenceModel.scala +++ b/zoo/src/main/scala/com/intel/analytics/zoo/pipeline/inference/InferenceModel.scala @@ -523,7 +523,7 @@ class InferenceModel(private var autoScalingEnabled: Boolean = true, /** * release original model and all the cloned ones in the queue */ - def release(): Unit = { + def doRelease(): Unit = { clearModelQueue() } diff --git a/zoo/src/test/scala/com/intel/analytics/zoo/pipeline/inference/OpenVINOModelSuite.scala b/zoo/src/test/scala/com/intel/analytics/zoo/pipeline/inference/OpenVINOModelSuite.scala index 39e3be3bfd7..f680b802f33 100644 --- a/zoo/src/test/scala/com/intel/analytics/zoo/pipeline/inference/OpenVINOModelSuite.scala +++ b/zoo/src/test/scala/com/intel/analytics/zoo/pipeline/inference/OpenVINOModelSuite.scala @@ -157,7 +157,7 @@ class OpenVINOModelSuite extends FunSuite with Matchers with BeforeAndAfterAll threads2.foreach(_.join()) fasterrcnnModel.release() - fasterrcnnInferenceModel.release() + fasterrcnnInferenceModel.doRelease() } def almostEqual(x: Float, y: Float, precision: Float): Boolean = {