-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML][Inference] Adds validations for model PUT #51376
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][Inference] Adds validations for model PUT #51376
Conversation
|
Pinging @elastic/ml-core (:ml) |
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
| @Override | ||
| public void validate() { | ||
| if (this.models.isEmpty()) { | ||
| throw ExceptionsHelper.badRequestException("[trained_models] must not be empty"); |
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.
Would it make sense to use TRAINED_MODELS.getPreferredName() here rather than literal?
| @Override | ||
| public void validate() { | ||
| if (featureNames.isEmpty()) { | ||
| throw ExceptionsHelper.badRequestException("[feature_names] must not be empty for tree model"); |
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.
Would it make sense to use FEATURE_NAMES.getPreferredName() here rather than literal?
Adds validations making sure that * `input.field_names` is not empty * `ensemble.trained_models` is not empty * `tree.feature_names` is not empty closes elastic#51354
Adds validations making sure that * `input.field_names` is not empty * `ensemble.trained_models` is not empty * `tree.feature_names` is not empty closes elastic#51354
Adds validations making sure that
input.field_namesis not emptyensemble.trained_modelsis not emptytree.feature_namesis not emptycloses #51354