diff --git a/common/src/main/java/org/opensearch/ml/common/dataset/TextSimilarityInputDataSet.java b/common/src/main/java/org/opensearch/ml/common/dataset/TextSimilarityInputDataSet.java index 93b32ec212..649146410c 100644 --- a/common/src/main/java/org/opensearch/ml/common/dataset/TextSimilarityInputDataSet.java +++ b/common/src/main/java/org/opensearch/ml/common/dataset/TextSimilarityInputDataSet.java @@ -46,7 +46,7 @@ public TextSimilarityInputDataSet(String queryText, List textDocs) { Objects.requireNonNull(textDocs); Objects.requireNonNull(queryText); if(textDocs.isEmpty()) { - throw new IllegalArgumentException("No text documents provided"); + throw new IllegalArgumentException("No text documents were provided"); } this.textDocs = textDocs; this.queryText = queryText; diff --git a/common/src/test/java/org/opensearch/ml/common/dataset/TextSimilarityInputDatasetTest.java b/common/src/test/java/org/opensearch/ml/common/dataset/TextSimilarityInputDatasetTest.java index 040ed1968c..74969d537f 100644 --- a/common/src/test/java/org/opensearch/ml/common/dataset/TextSimilarityInputDatasetTest.java +++ b/common/src/test/java/org/opensearch/ml/common/dataset/TextSimilarityInputDatasetTest.java @@ -52,7 +52,7 @@ public void noPairs_ThenFail() { String queryText = "today is sunny"; IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> TextSimilarityInputDataSet.builder().textDocs(docs).queryText(queryText).build()); - assert (e.getMessage().equals("No text documents provided")); + assert (e.getMessage().equals("No text documents were provided")); } @Test diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/text_similarity/TextSimilarityCrossEncoderModelTest.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/text_similarity/TextSimilarityCrossEncoderModelTest.java index 97d31eb6f7..bc991bd4f4 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/text_similarity/TextSimilarityCrossEncoderModelTest.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/text_similarity/TextSimilarityCrossEncoderModelTest.java @@ -98,7 +98,7 @@ public void setUp() throws URISyntaxException { .build(); modelHelper = new ModelHelper(mlEngine); params = new HashMap<>(); - modelZipFile = new File(getClass().getResource("TinyBERT-CE.zip").toURI()); + modelZipFile = new File(getClass().getResource("TinyBERT-CE-pt.zip").toURI()); params.put(MODEL_ZIP_FILE, modelZipFile); params.put(MODEL_HELPER, modelHelper); params.put(ML_ENGINE, mlEngine); @@ -220,7 +220,7 @@ public void initModel_predict_ONNX_CrossEncoder() throws URISyntaxException { @Test public void initModel_NullModelHelper() throws URISyntaxException { Map params = new HashMap<>(); - params.put(MODEL_ZIP_FILE, new File(getClass().getResource("TinyBERT-CE.zip").toURI())); + params.put(MODEL_ZIP_FILE, new File(getClass().getResource("TinyBERT-CE-pt.zip").toURI())); IllegalArgumentException e = assertThrows( IllegalArgumentException.class, () -> textSimilarityCrossEncoderModel.initModel(model, params, encryptor) @@ -231,7 +231,7 @@ public void initModel_NullModelHelper() throws URISyntaxException { @Test public void initModel_NullMLEngine() throws URISyntaxException { Map params = new HashMap<>(); - params.put(MODEL_ZIP_FILE, new File(getClass().getResource("TinyBERT-CE.zip").toURI())); + params.put(MODEL_ZIP_FILE, new File(getClass().getResource("TinyBERT-CE-pt.zip").toURI())); params.put(MODEL_HELPER, modelHelper); IllegalArgumentException e = assertThrows( IllegalArgumentException.class, diff --git a/ml-algorithms/src/test/resources/org/opensearch/ml/engine/algorithms/text_similarity/TinyBERT-CE.zip b/ml-algorithms/src/test/resources/org/opensearch/ml/engine/algorithms/text_similarity/TinyBERT-CE-pt.zip similarity index 100% rename from ml-algorithms/src/test/resources/org/opensearch/ml/engine/algorithms/text_similarity/TinyBERT-CE.zip rename to ml-algorithms/src/test/resources/org/opensearch/ml/engine/algorithms/text_similarity/TinyBERT-CE-pt.zip