-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Update vCPUs ranges for start model deployment (#195617)
## Summary #### Different vCPUs ranges and enabling support for static allocations based on the serverless project type - Each serverless config yml, e.g. [search.es.yml](https://github.com/darnautov/kibana/blob/84b3b79a1537fd98b18d1f137b16b532f3f1061f/config/serverless.es.yml#L61) now contains parameters required for start model deployment: ```yml xpack.ml.nlp: enabled: true modelDeployment: allowStaticAllocations: true vCPURange: low: min: 0 max: 2 static: 2 medium: min: 1 max: 32 static: 32 high: min: 1 max: 512 static: 512 ``` Note: _There will be no static allocations option for serverless O11y and serverless Security._ #### The minimum values of vCPUs - 0 for the Low usage level on both serverless and ESS. - 1 for the Medium and High usage levels on both serverless and ESS. #### The default vCPUs usage levels - Low in serverless. - Medium in ESS and on-prem ### Checklist - [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
- Loading branch information
Showing
18 changed files
with
493 additions
and
75 deletions.
There are no files selected for viewing
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
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
39 changes: 39 additions & 0 deletions
39
x-pack/plugins/ml/public/application/contexts/ml/ml_server_info_context.tsx
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,39 @@ | ||
/* | ||
* 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 React, { type FC, type PropsWithChildren, createContext, useContext } from 'react'; | ||
import type { NLPSettings } from '../../../../common/constants/app'; | ||
|
||
export interface MlServerInfoContextValue { | ||
// TODO add ML server info | ||
nlpSettings: NLPSettings; | ||
} | ||
|
||
export const MlServerInfoContext = createContext<MlServerInfoContextValue | undefined>(undefined); | ||
|
||
export const MlServerInfoContextProvider: FC<PropsWithChildren<MlServerInfoContextValue>> = ({ | ||
children, | ||
nlpSettings, | ||
}) => { | ||
return ( | ||
<MlServerInfoContext.Provider | ||
value={{ | ||
nlpSettings, | ||
}} | ||
> | ||
{children} | ||
</MlServerInfoContext.Provider> | ||
); | ||
}; | ||
|
||
export function useMlServerInfo() { | ||
const context = useContext(MlServerInfoContext); | ||
if (context === undefined) { | ||
throw new Error('useMlServerInfo must be used within a MlServerInfoContextProvider'); | ||
} | ||
return context; | ||
} |
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.