-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enterprise Search] Support for starting ELSER model deployment (#156080
) ## Summary We're adding action buttons to the ELSER model deployment panel, specifically to the state where the trained model has been downloaded but not started yet. The user has two options here: - Start the model (synchronously) with a basic configuration using the "Start single-threaded" button - Navigate to the Trained Models page and fine-tune the model deployment with the "Fine-tune performance" button In addition a 4th state of the panel is being introduced: the ELSER model has started. ![ELSER_start](https://user-images.githubusercontent.com/14224983/234971172-a99917dd-ec55-4df3-acd1-a6b390262104.gif) ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
23d47b7
commit 5897708
Showing
7 changed files
with
319 additions
and
61 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...prise_search_content/api/ml_models/text_expansion/start_text_expansion_model_api_logic.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { ELSER_MODEL_ID } from '../../../../../../common/ml_inference_pipeline'; | ||
import { Actions, createApiLogic } from '../../../../shared/api_logic/create_api_logic'; | ||
import { HttpLogic } from '../../../../shared/http'; | ||
|
||
export type StartTextExpansionModelArgs = undefined; | ||
|
||
export interface StartTextExpansionModelResponse { | ||
deploymentState: string; | ||
modelId: string; | ||
} | ||
|
||
export const startTextExpansionModel = async (): Promise<StartTextExpansionModelResponse> => { | ||
const route = `/internal/enterprise_search/ml/models/${ELSER_MODEL_ID}/deploy`; | ||
return await HttpLogic.values.http.post<StartTextExpansionModelResponse>(route, { | ||
body: undefined, | ||
}); | ||
}; | ||
|
||
export const StartTextExpansionModelApiLogic = createApiLogic( | ||
['start_text_expansion_model_api_logic'], | ||
startTextExpansionModel | ||
); | ||
|
||
export type StartTextExpansionModelApiLogicActions = Actions< | ||
StartTextExpansionModelArgs, | ||
StartTextExpansionModelResponse | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.