-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] write deprecation warning when include_model_definition parameter is used #62834
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
[ML] write deprecation warning when include_model_definition parameter is used #62834
Conversation
|
Pinging @elastic/ml-core (:ml) |
8c76b21 to
95ddf71
Compare
|
run elasticsearch-ci/packaging-sample-windows |
| features: "warnings" | ||
| - do: | ||
| warnings: | ||
| - "[include_model_definition] parameter is deprecated! Use parameter [include] and supply the flag 'definition' instead." |
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'm wondering if the wording here could be more direct and say sth like: "Use [include=definition] instead".
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 can update the message, for sure.
| "[{}] parameter is deprecated! Use parameter [{}] and supply the flag 'definition' instead.", | ||
| GetTrainedModelsAction.Request.INCLUDE_MODEL_DEFINITION, | ||
| GetTrainedModelsAction.Request.INCLUDE.getPreferredName()); | ||
| request = new GetTrainedModelsAction.Request(modelId, |
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.
Should this constructor now go away?
public Request(String id, boolean includeModelDefinition, List<String> tags) {
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.
No, it's a convenience method for when the user calls with a deprecated flag. Consequently, itself is also deprecated.
przemekwitek
left a comment
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.
LGTM
Changes in the message do not require further review from my side.
...n/ml/src/main/java/org/elasticsearch/xpack/ml/rest/inference/RestGetTrainedModelsAction.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/src/test/resources/rest-api-spec/test/ml/inference_crud.yml
Outdated
Show resolved
Hide resolved
…r is used (elastic#62834) for get trained models include_model_definition is now deprecated. This commit writes a deprecation warning if that parameter is used and suggests the caller to utilize the replacement
for get trained models
include_model_definitionis now deprecated.This commit writes a deprecation warning if that parameter is used and suggests the caller to utilize the replacement