Skip to content

Conversation

@benwtrent
Copy link
Member

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

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

@benwtrent benwtrent force-pushed the feature/ml-get-model-deprecation-warning branch from 8c76b21 to 95ddf71 Compare September 23, 2020 15:39
@benwtrent
Copy link
Member Author

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."
Copy link
Contributor

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".

Copy link
Member Author

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,
Copy link
Contributor

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) {

Copy link
Member Author

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.

Copy link
Contributor

@przemekwitek przemekwitek left a 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.

@benwtrent benwtrent merged commit 4819e14 into elastic:master Sep 24, 2020
@benwtrent benwtrent deleted the feature/ml-get-model-deprecation-warning branch September 24, 2020 14:44
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Sep 24, 2020
…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
benwtrent added a commit that referenced this pull request Sep 24, 2020
…r is used (#62834) (#62885)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants