Skip to content

Commit 65ef97e

Browse files
Fix bwc issue in remote prediction (#2085) (#2097)
* Fix bwc issue in remote prediction Signed-off-by: Sicheng Song <[email protected]> * Fix typo Signed-off-by: Sicheng Song <[email protected]> * Re-order the function name type to the right order Signed-off-by: Sicheng Song <[email protected]> --------- Signed-off-by: Sicheng Song <[email protected]> (cherry picked from commit b3dfabc) Co-authored-by: Sicheng Song <[email protected]>
1 parent 8691863 commit 65ef97e

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

common/src/main/java/org/opensearch/ml/common/FunctionName.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
import java.util.HashSet;
99
import java.util.Set;
1010

11+
// Please strictly add new FunctionName to the last line
12+
// and avoid altering the order of the existing FunctionName,
13+
// or it will break the backward compatibility!
1114
public enum FunctionName {
1215
LINEAR_REGRESSION,
1316
KMEANS,
@@ -20,11 +23,11 @@ public enum FunctionName {
2023
RCF_SUMMARIZE,
2124
LOGISTIC_REGRESSION,
2225
TEXT_EMBEDDING,
23-
TEXT_SIMILARITY,
24-
SPARSE_ENCODING,
25-
SPARSE_TOKENIZE,
2626
METRICS_CORRELATION,
2727
REMOTE,
28+
SPARSE_ENCODING,
29+
SPARSE_TOKENIZE,
30+
TEXT_SIMILARITY,
2831
AGENT;
2932

3033
public static FunctionName from(String value) {

common/src/main/java/org/opensearch/ml/common/dataset/MLInputDataType.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55

66
package org.opensearch.ml.common.dataset;
77

8+
// Please strictly add new MLInputDataType to the last line
9+
// and avoid altering the order of the existing MLInputDataType,
10+
// or it will break the backward compatibility!
811
public enum MLInputDataType {
912
SEARCH_QUERY,
1013
DATA_FRAME,
1114
TEXT_DOCS,
12-
TEXT_SIMILARITY,
13-
REMOTE
15+
REMOTE,
16+
TEXT_SIMILARITY
1417
}

0 commit comments

Comments
 (0)