akshayrai commented on a change in pull request #4250: SoC - Separate out
Tuning from Translator
URL: https://github.com/apache/incubator-pinot/pull/4250#discussion_r288790759
##########
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:
That's a good question! I included it to keep it consistent with,
1. how we retain the raw params for other non-tunable components
2. how we include this in the spec before calling the tuner
----------------------------------------------------------------
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]