-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Enterprise Search] Support for starting ELSER model deployment #156080
Merged
demjened
merged 19 commits into
elastic:main
from
demjened:demjened/elser-start-model-deployment
May 1, 2023
Merged
Changes from 5 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b9b9b3f
Add start deployment button and deployed state
demjened 65af853
Add deployment actions
demjened a965424
Link start button action & disabling logic
demjened 4ba092e
Add unit tests
demjened 7135960
Mooooar unit tests
demjened a82f0ac
Deduplicate i18n key
demjened 20e46b1
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine c4ce39a
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine 8314b54
Fix missing aria-label (unrelated)
demjened eb99068
Use EuiCallOut + address other CR comments
demjened 601532d
Add spacer
demjened 6dd50e6
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine 26017ee
Align buttons with grow=false
demjened 293fdc5
Merge branch 'demjened/elser-start-model-deployment' of https://githu…
demjened 0c79e4b
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine edff900
Minor style tweaks + revert empty interfaces
demjened 5c04bac
Merge branch 'main' into demjened/elser-start-model-deployment
demjened 0e9a02c
Merge branch 'main' into demjened/elser-start-model-deployment
demjened 86bdf84
Merge branch 'main' into demjened/elser-start-model-deployment
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nitpick(non-blocking): Best practice is to specify an empty object rather than undefined.
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.
Hm, this is breaking the type checks:
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.
@sphilipse I reverted to
undefined
because I couldn't find a way to fix the CI error.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.
Sorry, what you want to do instead is use {} wherever you're using StartTextExpansionModelArgs. But this is a nitpick anyway.