-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] DF Analytics - auto-populate model_memory_limit #50714
[ML] DF Analytics - auto-populate model_memory_limit #50714
Conversation
Pinging @elastic/ml-ui (:ml) |
💔 Build Failed
|
💚 Build Succeeded
|
cc @droberts195 |
const jobConfig = getJobConfigFromFormState(form); | ||
delete jobConfig.dest; |
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.
it can be const { dest, ...jobConfig} = getJobConfigFromFormState(form);
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.
Thanks for taking a look! 😄
I think that's a good option if mutability is a concern, but in this case jobConfig
isn't relied on for anything else. I think in this case I prefer clarity of semantics and functionality by explicitly using delete
.
Unless I'm missing some other benefit that this has over using delete
🤔
cc @darnautov
@@ -69,6 +69,7 @@ declare interface Ml { | |||
getDataFrameAnalyticsStats(analyticsId?: string): Promise<GetDataFrameAnalyticsStatsResponse>; | |||
createDataFrameAnalytics(analyticsId: string, analyticsConfig: any): Promise<any>; | |||
evaluateDataFrameAnalytics(evaluateConfig: any): Promise<any>; | |||
estimateMemoryUsage(jobConfig: any): Promise<any>; |
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.
could you please provide types here?
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.
Added type: b63f93e177edf6bbfb133a3a5505aae67cde091b
@@ -170,6 +170,16 @@ export const elasticsearchJsPlugin = (Client, config, components) => { | |||
method: 'POST' | |||
}); | |||
|
|||
ml.estimateMemoryUsage = ca({ |
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.
I think DataFrameAnalytics
should be in the function name here. More verbose, but otherwise it isn't clear that is can't be used to estimate the MML for anomaly detection jobs for example. estimateDataFrameAnalyticsMemoryUsage
!?
@@ -69,6 +69,7 @@ declare interface Ml { | |||
getDataFrameAnalyticsStats(analyticsId?: string): Promise<GetDataFrameAnalyticsStatsResponse>; | |||
createDataFrameAnalytics(analyticsId: string, analyticsConfig: any): Promise<any>; | |||
evaluateDataFrameAnalytics(evaluateConfig: any): Promise<any>; | |||
estimateMemoryUsage(jobConfig: any): Promise<any>; |
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.
As discussed below, I think DataFrameAnalytics
needs to be in the function name here.
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.
Updated to include DataFrameAnalytics
in the function name: b63f93e177edf6bbfb133a3a5505aae67cde091b
...lytics/pages/analytics_management/components/create_analytics_form/create_analytics_form.tsx
Show resolved
Hide resolved
defaultMessage: 'Model memory limit', | ||
})} | ||
> | ||
<EuiFieldText |
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.
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.
Placeholder added: f8c50cfe758da1782208983286bf40e4fc06af1f
export enum DEFAULT_MODEL_MEMORY_LIMIT { | ||
regression = '100mb', | ||
// eslint-disable-next-line @typescript-eslint/camelcase | ||
outlier_detection = '50mb', |
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.
Is this used? When I start in the wizard, and set the type to Outlier detection, the default stays at 100mb.
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.
Yes this is used as the default value placeholder for when jobType is outlier detection.
b605812
to
d30ee0f
Compare
💚 Build Succeeded
|
💚 Build Succeeded
|
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.
Code LGTM! Would be good to add some tests to reducer.test.ts
since we already have that in place to write tests against it.
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.
Tested latest edits and LGTM
cb14d92
to
0c4f7d8
Compare
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.
Latest changes LGTM
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.
LGTM!
💚 Build Succeeded |
* create modelMemoryLimit estimation endpoint. add value to form * add validation for model memory limit field * update jest tests * update validateModelMemoryLimitUnitsUtils to be more generic * add placeholder and validation with helpText to modelMemoryLimit field * update endpoint name to estimateDataFrameAnalyticsMemoryUsage for clarity * tweak modelMemoryLimitEmpty check in reducer * add tests for modelMemoryLimit validation
* create modelMemoryLimit estimation endpoint. add value to form * add validation for model memory limit field * update jest tests * update validateModelMemoryLimitUnitsUtils to be more generic * add placeholder and validation with helpText to modelMemoryLimit field * update endpoint name to estimateDataFrameAnalyticsMemoryUsage for clarity * tweak modelMemoryLimitEmpty check in reducer * add tests for modelMemoryLimit validation
…-fallback * 'master' of github.com:elastic/kibana: (116 commits) [Maps] move apply global filter settting from layer to source (elastic#50523) [SIEM] Fix: Empty `Source` / `Destination` shown when only ports are populated (elastic#50843) [Maps] Delay vector tile layer syncing until spritesheet is loaded (elastic#48955) [Maps] prevent users from overflowing URL when filtering by shape (elastic#50747) [DOCS] Mark Beats central management as discontinued (elastic#49423) [page_objects/common_page] convert to ts (elastic#50771) [NP Kibana Migrations ] kibana plugin home (elastic#50444) [DOCS] Shareables naming convention (elastic#50497) [ML] DF Analytics - auto-populate model_memory_limit (elastic#50714) Increase alerting test stability and reduce flakiness (elastic#50246) [ML] Remaning new_job_new folder (elastic#50917) [Telemetry] Show opt-in changes for OSS users (elastic#50831) [ML] Fix lat_long anomalies table links menu and value formatting (elastic#50916) [Dev] Fix serialising a really big string (elastic#50915) Better explanation about the Prettier recommendation (extension vs. NPM module) (elastic#50629) [Monitoring] Use a basic monitoring user for tests (elastic#47865) [Monitoring] Gracefully handle issue with filebeat indices (elastic#48929) [Monitoring] Improve permissions required around setup mode (elastic#50421) Additional validation for elasticsearch username (elastic#48247) Revert changes to use_kibana_ui_setting (elastic#50877) ... # Conflicts: # src/legacy/core_plugins/console/server/request.test.ts
Summary
Fix for #43740 (Improve UX regarding df analytics model memory limit)
Auto-populates
model_memory_limit
field usingml/data_frame/analytics/_estimate_memory_usage
endpoint.validateModelMemoryLimitUnits
has been updated to be be more generic. cc @jgowdyelasticValidates that mml is not empty and has valid content in both the advanced editor:
and the form:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorialsFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately