jihaozh commented on a change in pull request #4149: [TE] support monitoring 
granularity for Holt Winters
URL: https://github.com/apache/incubator-pinot/pull/4149#discussion_r277110402
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/components/HoltWintersDetector.java
 ##########
 @@ -112,13 +112,25 @@ public void init(HoltWintersDetectorSpec spec, 
InputDataFetcher dataFetcher) {
     this.pattern = spec.getPattern();
     this.smoothing = spec.getSmoothing();
     this.sensitivity = spec.getSensitivity();
+    this.monitoringGranularity = spec.getMonitoringGranularity();
+
+    if (this.monitoringGranularity.equals("1_MONTHS")) {
+      this.timeGranularity = MetricSlice.NATIVE_GRANULARITY;
 
 Review comment:
   Pinot doesn't support monthly aggregation from the query. Monthly detection 
is only doable if only the dataset itself is marked as daily granularity but 
only have one data point per month. So for monthly detection, when fetching 
data should still use native granularity, but the algorithm needs to be aware 
that it's a monthly granularity data and fetches the right training data to 
construct the correct baseline. 
   
   @tangdian I'm not sure this will work for the monthly dataset. looks like 
you are still retrieving 60 days' training data. Then it's likely that there 
only 1 data point in there. Since this is not required, you can throw a 
NotImpelemented exception in this case if it's hard to make it work.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to