-
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
enable auto redeploy for hidden model #2102
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 |
---|---|---|
|
@@ -857,7 +857,7 @@ private void updateModelRegisterStateAsDone( | |
void deployModelAfterRegistering(MLRegisterModelInput registerModelInput, String modelId) { | ||
String[] modelNodeIds = registerModelInput.getModelNodeIds(); | ||
log.debug("start deploying model after registering, modelId: {} on nodes: {}", modelId, Arrays.toString(modelNodeIds)); | ||
MLDeployModelRequest request = new MLDeployModelRequest(modelId, modelNodeIds, false, true); | ||
MLDeployModelRequest request = new MLDeployModelRequest(modelId, modelNodeIds, false, true, true); | ||
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. What if user define a flow template with deploy hidden model action in it ? Can user deploy any hidden 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. Isn't hidden model management (register, deploy, undeploy, delete) is out of scope for AI-Flow? 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. With a flow template, we will still consider it as user initiated right. So we will still check for access. Only if it is system initiated, we will bypass the access checks 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 for normal process, but that's not a hard control. User can copy the hidden model id and define a flow template to deploy it. 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. Can user see the hidden model id? I thought only superAdmin can see it. 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.
model id isn't hidden to users. But model content is hidden to users. During prediction, model id is being used. As user can make the prediction request, they can know the model id eventually. 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.
We opened this deploy request to clients and then user initiated request flag is being set to true from code. So every request sent from ai-flow or any other clients should be treated as user initiated request too. |
||
ActionListener<MLDeployModelResponse> listener = ActionListener | ||
.wrap(r -> log.debug("model deployed, response {}", r), e -> log.error("Failed to deploy model", e)); | ||
client.execute(MLDeployModelAction.INSTANCE, request, listener); | ||
|
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.
[nit] may be add a comment why here
isUserInitiatedDeployRequest
will always be true?