Skip to content
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] Enabling mml estimation in data recognizer module setup #64900

Conversation

jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Apr 30, 2020

Enables the model memory limit estimation by default for the /api/ml/modules/setup endpoint.
Also fixes an issue where the module's query was being used for retrieving the index time range and for the estimation.
The module's query is used for the "recognising" aspect of this feature and is not appropriate for mml estimation.
Instead the queries from each datafeed are used instead. Unless there is a common time field where a general match_all is used.

Part of #48510

Also fixes issue with uptime ML integration functional tests where the index data hadn't been loaded before the tests start.

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚡

@darnautov
Copy link
Contributor

Code LGTM, but I don't see unit or functional tests 👀 It'd nice to have a basic unit test for updateModelMemoryLimits function

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and LGTM

@jgowdyelastic
Copy link
Member Author

@darnautov functional tests added in de1f4a4

@jgowdyelastic
Copy link
Member Author

@pheyos added you as a reviewer of the tests.

@jgowdyelastic jgowdyelastic requested a review from pheyos May 1, 2020 14:49
prefix: 'pf2_',
indexPatternName: 'kibana_sample_data_logs',
startDatafeed: false,
estimateModelMemory: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably worth to omit this parameter to validate that estimateModelMemory is enabled by default

Comment on lines +254 to +257
}: {
body: {
jobs: Job[];
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be better to provide a return type for getAnomalyDetectionJob method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but would touch other files which use it, so should be done in a refactor follow up.

@jgowdyelastic
Copy link
Member Author

@elasticmachine merge upstream

@jgowdyelastic
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uptime test change LGTM !!

@jgowdyelastic jgowdyelastic merged commit 33b2b5c into elastic:master May 4, 2020
@jgowdyelastic jgowdyelastic deleted the enabling-mml-estimation-in-data-recognizer-modules branch May 4, 2020 18:30
jgowdyelastic added a commit to jgowdyelastic/kibana that referenced this pull request May 4, 2020
…#64900)

* [ML] Enabling mml estimation in data recognizer module setup

* small refactor

* adding functional tests

* increasing uptime test timeout

* tiny refactor

* checking for default setting

* testng flakey uptime test

* catching erros in mml estimation

* lowering timeout

* ensuing data is present for ML tests

* adding await

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jgowdyelastic added a commit that referenced this pull request May 4, 2020
…#65141)

* [ML] Enabling mml estimation in data recognizer module setup

* small refactor

* adding functional tests

* increasing uptime test timeout

* tiny refactor

* checking for default setting

* testng flakey uptime test

* catching erros in mml estimation

* lowering timeout

* ensuing data is present for ML tests

* adding await

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants