-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return model id in registering remote model #1329
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,6 +233,7 @@ private void registerModel(MLRegisterModelInput registerModelInput, ActionListen | |
throw new IllegalArgumentException("URL can't match trusted url regex"); | ||
} | ||
} | ||
System.out.println("registering the model"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we keeping this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's avoid using system out print There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I guarante these redundant lines will be removed in my next PR. |
||
boolean isAsync = registerModelInput.getFunctionName() != FunctionName.REMOTE; | ||
MLTask mlTask = MLTask | ||
.builder() | ||
|
@@ -249,8 +250,8 @@ private void registerModel(MLRegisterModelInput registerModelInput, ActionListen | |
mlTaskManager.createMLTask(mlTask, ActionListener.wrap(response -> { | ||
String taskId = response.getId(); | ||
mlTask.setTaskId(taskId); | ||
mlModelManager.registerMLModel(registerModelInput, mlTask); | ||
listener.onResponse(new MLRegisterModelResponse(taskId, MLTaskState.CREATED.name())); | ||
System.out.println("mlModelManager calls registerMLRemoteModel"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Probably unintended? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! I think I forgot to delete. They will be cleaned up for sure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we keeping this line? |
||
mlModelManager.registerMLRemoteModel(registerModelInput, mlTask, listener); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the expectation that, only remote model registration will be asynchronous? If yes, can we please add a comment here also? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just the opposite, remote model registration is synchronous only so the model_id can be returned right away. Comments will be added in the next PR. |
||
}, e -> { | ||
logException("Failed to register model", e, log); | ||
listener.onFailure(e); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like a good improvement for remote models, do we really have a taskId which is doing real work for remote models?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we have a actual task id. It will do some validation work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious what kind of validations ?