diff --git a/src/java/README.md b/src/java/README.md index 067374130..9cd74b8a2 100644 --- a/src/java/README.md +++ b/src/java/README.md @@ -78,6 +78,7 @@ public class MinExample { InferenceServerClient client = new InferenceServerClient("0.0.0.0:8000", 5000, 5000); InferResult result = client.infer("roberta", inputs, outputs); + client.close(); float[] logits = result.getOutputAsFloat("logits"); System.out.println(Arrays.toString(logits)); } diff --git a/src/java/src/main/java/triton/client/examples/MemoryGrowthTest.java b/src/java/src/main/java/triton/client/examples/MemoryGrowthTest.java index daaaba7de..985c8b562 100644 --- a/src/java/src/main/java/triton/client/examples/MemoryGrowthTest.java +++ b/src/java/src/main/java/triton/client/examples/MemoryGrowthTest.java @@ -57,6 +57,7 @@ public static void main(String[] args) throws Exception InferenceServerClient client = new InferenceServerClient("0.0.0.0:8000", 5000, 5000); InferResult result = client.infer("custom_identity_int32", inputs, outputs); + client.close(); // Get the output arrays from the results and verify int[] output0 = result.getOutputAsInt("OUTPUT0"); diff --git a/src/java/src/main/java/triton/client/examples/SimpleInferClient.java b/src/java/src/main/java/triton/client/examples/SimpleInferClient.java index 50d26e04b..6be50a1bd 100644 --- a/src/java/src/main/java/triton/client/examples/SimpleInferClient.java +++ b/src/java/src/main/java/triton/client/examples/SimpleInferClient.java @@ -65,6 +65,7 @@ public static void main(String[] args) throws Exception InferenceServerClient client = new InferenceServerClient("0.0.0.0:8000", 5000, 5000); InferResult result = client.infer("simple", inputs, outputs); + client.close(); // Get the output arrays from the results int[] op0 = result.getOutputAsInt("OUTPUT0");