You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/07/23 23:49:32 UTC

[GitHub] [incubator-pinot] xiaohui-sun commented on a change in pull request #4465: [TE] logs and precondition checks for pipeline re-tuning

xiaohui-sun commented on a change in pull request #4465: [TE] logs and precondition checks for pipeline re-tuning
URL: https://github.com/apache/incubator-pinot/pull/4465#discussion_r306578772
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/ModelRetuneFlow.java
 ##########
 @@ -42,23 +46,26 @@
  */
 public class ModelRetuneFlow implements ModelMaintenanceFlow {
   private static final int DEFAULT_TUNING_WINDOW_DAYS = 28;
+  private static final Logger LOG = LoggerFactory.getLogger(ModelRetuneFlow.class);
 
   private final DataProvider provider;
   private final DetectionRegistry detectionRegistry;
 
-  ModelRetuneFlow(DataProvider provider, DetectionRegistry detectionRegistry) {
+  public ModelRetuneFlow(DataProvider provider, DetectionRegistry detectionRegistry) {
     this.provider = provider;
     this.detectionRegistry = detectionRegistry;
   }
 
   public DetectionConfigDTO maintain(DetectionConfigDTO config, Instant timestamp) {
+    Preconditions.checkArgument(!Objects.isNull(config.getComponents()) && !config.getComponents().isEmpty(), "Components not initialized");
     if (isTunable(config)) {
       // if the pipeline is tunable, get the model evaluators
       Collection<? extends ModelEvaluator<? extends AbstractSpec>> modelEvaluators = getModelEvaluators(config);
       // check the status for model evaluators
       for (ModelEvaluator<? extends AbstractSpec> modelEvaluator : modelEvaluators) {
         // if returns bad model status, trigger model tuning
         if (modelEvaluator.evaluateModel(timestamp).getStatus().equals(ModelStatus.BAD)) {
+          LOG.info("Status for detection pipeline {} is BAD, re-tuning", config.getId());
 
 Review comment:
   use ModelStatus.BAD instead of "BAD".

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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