jihaozh commented on a change in pull request #3875: [TE] detection add
upper/lower bounds to detection output
URL: https://github.com/apache/incubator-pinot/pull/3875#discussion_r260002238
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
##########
@@ -143,12 +145,15 @@ public DetectionPipelineResult run() throws Exception {
List<Interval> monitoringWindows = this.getMonitoringWindows();
List<MergedAnomalyResultDTO> anomalies = new ArrayList<>();
+ TimeSeries predictions = new TimeSeries();
for (Interval window : monitoringWindows) {
List<MergedAnomalyResultDTO> anomaliesForOneWindow = new ArrayList<>();
try {
LOG.info("[New Pipeline] running detection for config {} metricUrn {}.
start time {}, end time {}", config.getId(), metricUrn, window.getStart(),
window.getEnd());
long ts = System.currentTimeMillis();
- anomaliesForOneWindow = anomalyDetector.runDetection(window,
this.metricUrn);
+ DetectionOutput output = anomalyDetector.runDetection(window,
this.metricUrn);
+ anomaliesForOneWindow = output.getAnomalies();
+ predictions.merge(output.getPredictions());
Review comment:
The windows in `monitoringWindows` are overlapped with each other. doing a
merge/append may not get the right result. Unless the moving window is moved
into the library, then we can simply get the predictions for the whole
detection range.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]