-
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
Check before delete #3209
base: main
Are you sure you want to change the base?
Check before delete #3209
Conversation
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
@@ -32,7 +32,7 @@ | |||
*/ | |||
@Log4j2 | |||
@ToolAnnotation(AgentTool.TYPE) | |||
public class AgentTool implements Tool { | |||
public class AgentTool implements WithoutModelTool { |
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.
I would like to think the other way. Regardless of having model, any tool developer can extend the Tool interface. So let's not change the Tool interface. Instead we can extend the Tool interface to ToolWithModel
which can have this extra method and the tools which aren't using models can implement Tool and the tools which are using models can implement ToolWithModel
interface?
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.
Sure, Please check it. Also with the logic in AgentModelSearcher to construct query.
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.
But I have concern. For this, we should make sure when a new tool with mlmodel is developed, it needs to implement ToolWithModel
but not Tool
. It's a requirement for code review and it's more like a soft rule. So I'm afraid in the future it may skip this logic if we code reviewers miss this.
plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java
Show resolved
Hide resolved
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Description
This pr is to check all downstream service before deleting ml model. Two downstream tasks are checking here:
For agent, we enforce this tool factory to implement a method to return the key field name of each tool. Then we create a should DSL query like
For pipelines, we fetch all ingestion pipelines and search pipelines and check for each pipeline whether they contain the candidate model id.
Related Issues
#3191
#3087
#3088
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.