jihaozh commented on a change in pull request #4250: SoC - Separate out Tuning 
from Translator
URL: https://github.com/apache/incubator-pinot/pull/4250#discussion_r288792879
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java
 ##########
 @@ -112,13 +120,14 @@ public DetectionConfigTuner(DetectionConfigDTO config, 
DataProvider dataProvider
     DateTime end =  new DateTime(endTime, timezone).withTimeAtStartOfDay();
     Interval window = new Interval(start, end);
 
-    // TODO can you use componentProps instead? what is the difference btw 
component and componentSpec
-    Map<String, Object> existingComponentSpec =
-        detectionConfig.getComponents().containsKey(componentKey) ?
-            MapUtils.getMap(detectionConfig.getComponents(), componentKey) : 
Collections.emptyMap();
-
     // TODO: if dimension drill down applied, pass in the metric urn of top 
dimension
-    return tunable.tune(existingComponentSpec, window, this.metricUrn);
+    tunedSpec.putAll(tunable.tune(componentProps, window, this.metricUrn));
+
+    // Hack to retain the raw yaml parameters.
+    // The tunable requires raw yaml params and previously tuned params to 
generate fresh params
+    tunedSpec.put(PROP_YAML_PARAMS, yamlParams);
 
 Review comment:
   make sense. it can also be used in re-tune.

----------------------------------------------------------------
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