Skip to content
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

Remove use of XPackLicenseState::isAllowedByLicense for ML models #79811

Closed
rjernst opened this issue Oct 26, 2021 · 4 comments · Fixed by #79908
Closed

Remove use of XPackLicenseState::isAllowedByLicense for ML models #79811

rjernst opened this issue Oct 26, 2021 · 4 comments · Fixed by #79908
Assignees
Labels
:ml Machine learning Team:ML Meta label for the ML team

Comments

@rjernst
Copy link
Member

rjernst commented Oct 26, 2021

XPackLicenseState is meant to be an opaque view of the current license level. The LicensedFeature class should be used to determine whether a feature is used, so that tracking is always. However, there are a few special methods on XPackLicenseState that currently avoid feature tracking. This issue is about one of those: isMachineLearningAllowedForOperationMode.

We should convert the one user of this method to using a proper LicensedFeature.

@rjernst rjernst added the :ml Machine learning label Oct 26, 2021
@elasticmachine elasticmachine added the Team:ML Meta label for the ML team label Oct 26, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@benwtrent benwtrent self-assigned this Oct 26, 2021
@benwtrent
Copy link
Member

@rjernst, the only user of this method is when we check the license level of a remote cluster. CCR (isCcrAllowedForOperationMode) does the same exact thing, verifying that the remote cluster license supports the given feature.

Is there work in this area already in getting CCR to stop using isCcrAllowedForOperationMode?

I am not sure which feature we would be tracking regardless as the API calls + persistent tasks cover the actual feature usage, we are simply checking the license of the remote cluster.

@rjernst
Copy link
Member Author

rjernst commented Oct 26, 2021

Thanks Ben, I realized I was thinking of the wrong method, I've corrected the title of this issue. I will fix the remote checkers (which I don't think need to actually be tracked). The one I meant for this issue to cover is the use in TransportInternalInferModelAction and TransportPutTrainedModelAliasAction of passing in a license level (which is not tracked) instead of having checking a LicensedFeature object.

@rjernst rjernst changed the title Remove use of XPackLicenseState::isMachineLearningAllowedForOperationMode Remove use of XPackLicenseState::isAllowedByLicense for ML models Oct 26, 2021
@benwtrent
Copy link
Member

@rjernst awesome, I will look into isAllowedByLicense usage by ML

elasticsearchmachine pushed a commit that referenced this issue Oct 28, 2021
For trained models, there are both basic and platinum licenses allowed. 
We should track the feature usage check based on the license operation
mode instead of using the underlying isAllowedByLicense. closes:
#79811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning Team:ML Meta label for the ML team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants