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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]