From c40b374ec805476b5e340a49ecda92fa2087f3d2 Mon Sep 17 00:00:00 2001 From: HenryL27 Date: Fri, 10 Nov 2023 09:19:08 -0800 Subject: [PATCH] add function name annotation Signed-off-by: HenryL27 --- .../text_similarity/TextSimilarityCrossEncoderModel.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/text_similarity/TextSimilarityCrossEncoderModel.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/text_similarity/TextSimilarityCrossEncoderModel.java index 5a6cb4e076..aeba54ff8e 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/text_similarity/TextSimilarityCrossEncoderModel.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/text_similarity/TextSimilarityCrossEncoderModel.java @@ -21,6 +21,7 @@ import java.util.List; import org.apache.commons.lang3.tuple.Pair; +import org.opensearch.ml.common.FunctionName; import org.opensearch.ml.common.dataset.MLInputDataset; import org.opensearch.ml.common.dataset.TextSimilarityInputDataSet; import org.opensearch.ml.common.input.MLInput; @@ -28,6 +29,7 @@ import org.opensearch.ml.common.output.model.ModelTensorOutput; import org.opensearch.ml.common.output.model.ModelTensors; import org.opensearch.ml.engine.algorithms.DLModel; +import org.opensearch.ml.engine.annotation.Function; import ai.djl.modality.Input; import ai.djl.modality.Output; @@ -35,6 +37,7 @@ import ai.djl.translate.Translator; import ai.djl.translate.TranslatorFactory; +@Function(FunctionName.TEXT_SIMILARITY) public class TextSimilarityCrossEncoderModel extends DLModel { @Override