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

AD model performance benchmark #724

Merged
merged 2 commits into from
Nov 22, 2022
Merged

Conversation

kaituo
Copy link
Collaborator

@kaituo kaituo commented Nov 11, 2022

Description

This PR adds an AD model performance benchmark so that we can compare model performance across versions.

For the single stream detector, we refactored tests in DetectionResultEvalutationIT and moved it to SingleStreamModelPerfIT.

For the HCAD detector, we randomly generated synthetic data with known anomalies inserted throughout the signal. In particular, these are one/two/four dimensional data where each dimension is a noisy cosine wave. Anomalies are inserted into one dimension with 0.003 probability. Anomalies across each dimension can be independent or dependent. We have approximately 5000 observations per data set. The data set is generated using the same random seed so the result is comparable across versions.

We also backported #600 so that we can capture the performance data in CI output. We backported #625 to update bwc zip since odfe zip is unavaiable.

Testing done:

  • added unit tests to run the benchmark.

Signed-off-by: Kaituo Li kaituo@amazon.com

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

This PR adds an AD model performance benchmark so that we can compare model performance across versions.

Regarding benchmark data, we randomly generated synthetic data with known anomalies inserted throughout the signal. In particular, these are one/two/four dimensional data where each dimension is a noisy cosine wave. Anomalies are inserted into one dimension with 0.003 probability. Anomalies across each dimension can be independent or dependent. We have approximately 5000 observations per data set. The data set is generated using the same random seed so the result is comparable across versions.

We also backported opensearch-project#600 so that we can capture the performance data in CI output.

Testing done:
* added unit tests to run the benchmark.

Signed-off-by: Kaituo Li <kaituo@amazon.com>
@kaituo kaituo requested review from a team, amitgalitz and ohltyler November 11, 2022 23:15
@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2022

Codecov Report

Merging #724 (c95bd15) into 2.1 (9701efa) will decrease coverage by 0.17%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.1     #724      +/-   ##
============================================
- Coverage     79.23%   79.05%   -0.18%     
+ Complexity     4222     4212      -10     
============================================
  Files           296      296              
  Lines         17686    17686              
  Branches       1880     1880              
============================================
- Hits          14013    13982      -31     
- Misses         2779     2812      +33     
+ Partials        894      892       -2     
Flag Coverage Δ
plugin 79.05% <ø> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/main/java/org/opensearch/ad/util/ParseUtils.java 73.92% <0.00%> (-3.93%) ⬇️
...va/org/opensearch/ad/feature/SearchFeatureDao.java 82.78% <0.00%> (-3.86%) ⬇️
...rch/ad/transport/ForwardADTaskTransportAction.java 94.06% <0.00%> (-3.39%) ⬇️
...java/org/opensearch/ad/task/ADBatchTaskRunner.java 84.49% <0.00%> (-1.22%) ⬇️
...opensearch/ad/indices/AnomalyDetectionIndices.java 71.93% <0.00%> (-0.19%) ⬇️
...rch/ad/transport/AnomalyResultTransportAction.java 80.13% <0.00%> (ø)
...ain/java/org/opensearch/ad/task/ADTaskManager.java 77.73% <0.00%> (+0.37%) ⬆️
...ava/org/opensearch/ad/task/ADHCBatchTaskCache.java 92.59% <0.00%> (+1.23%) ⬆️

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
@@ -366,7 +379,7 @@ task integTestRemote(type: RestIntegTestTask) {
}
}

String bwcVersion = "1.13.0.0"
String bwcVersion = "1.1.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

thanks for updating these too :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

np :)

@kaituo kaituo merged commit 38129d3 into opensearch-project:2.1 Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants