Skip to content

Commit

Permalink
Autobump new model groups' latest version when register to a new model
Browse files Browse the repository at this point in the history
Signed-off-by: Sicheng Song <[email protected]>
  • Loading branch information
b4sjoo committed Oct 5, 2023
1 parent 0b1c663 commit f1758bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class MLModelGroup implements ToXContentObject {
@Setter
private String name;
private String description;
@Setter
private int latestVersion;
private List<String> backendRoles;
private User owner;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ private void updateModelWithRegisteringNewModelGroup(
mlModelGroupManager.getModelGroup(newModelGroupId, ActionListener.wrap(newModelGroup -> {
String updatedVersion = incrementLatestVersion(newModelGroup);
updateModelInput.setVersion(updatedVersion);
newModelGroup.setLatestVersion(Integer.parseInt(updatedVersion));
updateRequestConstructor(modelId, updateRequest, updateModelInput, actionListener);
},
exception -> actionListener
Expand Down

0 comments on commit f1758bd

Please sign in to comment.