Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Apr 20, 2021
1 parent 7a59661 commit bb2638c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ private static BytesReference getDefinitionFromDocs(List<TrainedModelDefinitionD
String modelId) throws ElasticsearchException {

BytesReference[] bb = new BytesReference[docs.size()];
for (int i=0; i<docs.size(); i++) {
for (int i = 0; i < docs.size(); i++) {
bb[i] = docs.get(i).getBinaryData();
}
BytesReference bytes = CompositeBytesReference.of(bb);
Expand All @@ -1104,7 +1104,7 @@ private static BytesReference getDefinitionFromDocs(List<TrainedModelDefinitionD

TrainedModelDefinitionDoc lastDoc = docs.get(docs.size() - 1);
// Either we are missing the last doc, or some previous doc
if(lastDoc.isEos() == false || lastDoc.getDocNum() != docs.size() - 1) {
if (lastDoc.isEos() == false || lastDoc.getDocNum() != docs.size() - 1) {
throw ExceptionsHelper.serverError(Messages.getMessage(Messages.MODEL_DEFINITION_TRUNCATED, modelId));
}
return bytes;
Expand Down

0 comments on commit bb2638c

Please sign in to comment.