Skip to content

Commit

Permalink
Update src/main/java/org/opensearch/neuralsearch/ml/MLCommonsClientAc…
Browse files Browse the repository at this point in the history
…cessor.java

Co-authored-by: zane-neo <[email protected]>
Signed-off-by: zhichao-aws <[email protected]>
  • Loading branch information
zhichao-aws and zane-neo authored Sep 25, 2023
1 parent 916b3cf commit 283a7a3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private List<List<Float>> buildVectorFromResponse(MLOutput mlOutput) {
final ModelTensorOutput modelTensorOutput = (ModelTensorOutput) mlOutput;
final List<ModelTensors> tensorOutputList = modelTensorOutput.getMlModelOutputs();
if (CollectionUtils.isEmpty(tensorOutputList) || CollectionUtils.isEmpty(tensorOutputList.get(0).getMlModelTensors())) {
throw new IllegalStateException("Empty model result produced. Expected 1 tensor output and 1 model tensor, but got [0]");
throw new IllegalStateException("Empty model result produced. Expected at least [1] tensor output and [1] model tensor, but got [0]");
}
List<Map<String, ?>> resultMaps = new ArrayList<>();
for (ModelTensors tensors : tensorOutputList) {
Expand Down

0 comments on commit 283a7a3

Please sign in to comment.