Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[ML] Add support for returning pt_tiny_elser from the ml.trainedModelsProvider.getELSER() helper function #193633

Open
spong opened this issue Sep 20, 2024 · 0 comments
Labels
needs-team Issues missing a team label

Comments

@spong
Copy link
Member

spong commented Sep 20, 2024

In plumbing through the Security Assistant Knowledge Base API integration tests (#192665), I ended up having to add support for a modelId override to our API's when interacting with the Knowledge Base as we currently use the ml.trainedModelsProvider.getELSER() helper (which does not return pt_tiny_elser in test environments) to get the modelId for setting up ELSER, ingest pipelines, retrievers, etc. The O11y Assistant folks also have an open issue (#192757) to do the same.

It would be nice if the getELSER() helper function below could either be overridden to return pt_tiny_elser in our test environments, or if our test environments could be updated such that the function returns pt_tiny_elser.

/**
* Provides an ELSER model name and configuration for download based on the current cluster architecture.
* The current default version is 2. If running on Cloud it returns the Linux x86_64 optimized version.
* If any of the ML nodes run a different OS rather than Linux, or the CPU architecture isn't x86_64,
* a portable version of the model is returned.
*/
async getELSER(
options?: GetModelDownloadConfigOptions
): Promise<ModelDefinitionResponse> | never {
return await this.getCuratedModelConfig('elser', options);
}

Note

Perhaps the need for this will go away or change somewhat when we switch from managing ELSER via the trainedModels API to using a default inference endpoint (#192461).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
needs-team Issues missing a team label
Projects
None yet
Development

No branches or pull requests

1 participant