Skip to content

Commit

Permalink
name test models w framework
Browse files Browse the repository at this point in the history
Signed-off-by: HenryL27 <hmlindeman@yahoo.com>
  • Loading branch information
HenryL27 committed Dec 6, 2023
1 parent 09e0f91 commit b3e90b5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public TextSimilarityInputDataSet(String queryText, List<String> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -220,7 +220,7 @@ public void initModel_predict_ONNX_CrossEncoder() throws URISyntaxException {
@Test
public void initModel_NullModelHelper() throws URISyntaxException {
Map<String, Object> 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)
Expand All @@ -231,7 +231,7 @@ public void initModel_NullModelHelper() throws URISyntaxException {
@Test
public void initModel_NullMLEngine() throws URISyntaxException {
Map<String, Object> 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,
Expand Down

0 comments on commit b3e90b5

Please sign in to comment.