You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ji...@apache.org on 2020/08/17 20:20:15 UTC

[incubator-pinot] 01/01: [TE] change dimension explore early stop to be 10% of top k

This is an automated email from the ASF dual-hosted git repository.

jihao pushed a commit to branch top-k-early-stop
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 6d09a3e1bed54d60270a543b34a7aa947c63846d
Author: Jihao Zhang <ji...@linkedin.com>
AuthorDate: Mon Aug 17 13:19:52 2020 -0700

    [TE] change dimension explore early stop to be 10% of top k
---
 .../apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java
index 4e3f0b5..a798cdb 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/DimensionWrapper.java
@@ -88,6 +88,7 @@ public class DimensionWrapper extends DetectionPipeline {
 
   // Stop running if the first several dimension combinations all failed.
   private static final int EARLY_STOP_THRESHOLD = 10;
+  private static final double EARLY_STOP_THRESHOLD_PERCENTAGE = 0.1;
 
   // by default, don't pre-fetch data into the cache
   private static final long DEFAULT_CACHING_PERIOD_LOOKBACK = -1;
@@ -390,7 +391,9 @@ public class DimensionWrapper extends DetectionPipeline {
   private void checkEarlyStop(long totalNestedMetrics, long successNestedMetrics, int i, List<Exception> exceptions)
       throws DetectionPipelineException {
     // if the first certain number of dimensions all failed, throw an exception
-    if (i == EARLY_STOP_THRESHOLD && successNestedMetrics == 0) {
+    // the threshold is set to the 10 percent of the number of dimensions and at least 10.
+    long earlyStopThreshold = Math.max(EARLY_STOP_THRESHOLD, (int)(totalNestedMetrics * EARLY_STOP_THRESHOLD_PERCENTAGE));
+    if (i == earlyStopThreshold && successNestedMetrics == 0) {
       throw new DetectionPipelineException(String.format(
           "Detection failed for first %d out of %d metric dimensions for monitoring window %d to %d, stop processing.",
           i, totalNestedMetrics, this.getStartTime(), this.getEndTime()), Iterables.getLast(exceptions));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org