-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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] simplifying model license checks #80031
[ML] simplifying model license checks #80031
Conversation
Pinging @elastic/ml-core (Team:ML) |
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.
One suggestion
@@ -268,7 +268,7 @@ public InferencePipelineAggregationBuilder rewrite(QueryRewriteContext context) | |||
loadedModel.set(model); | |||
|
|||
boolean isLicensed = MachineLearningField.ML_API_FEATURE.check(licenseState) | |||
|| featureCheckForMode(model.getLicenseLevel(), licenseState); | |||
|| model.getLicenseLevel() == License.OperationMode.BASIC; |
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 the order wrt the ML check above be reversed? That way if it is basic we don't trigger tracking for ML use?
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.
@rjernst 100%, that makes sense as we wouldn't want to track platinum usage. I will make that change. Good catch.
…-previously-license-checks-for-models
…-previously-license-checks-for-models
Since trained models require either a platinum or basic license, our license checking can be
simplified.
Now, we check if ML APIs are allowed (platinum) or if the trained model is
basic
.relates to: #79908