Holt Winters Tick Script

Hello. I am currently trying to set up a task with Holt Winters forecasting. Looking at the logs it seems to be getting data back from Influx in all of the queries. No errors in the logs but it won’t alert. Any ideas on where to start?

var training = batch
    |query('SELECT max(value) FROM "scripted_inputs"."default".test_counter')
        .offset(1d)
        .groupBy(time(1d))
        .period(30d)
        .every(1d)
    |log()
var predicted = training
    |holtWinters('max',1,7,1d)
      .as('value')
    |last('value')
        .as('value')
    |log()
var current = batch
    |query('SELECT max(value) FROM "scripted_inputs"."default".test_counter')
        .period(1d)
        .every(1d)
    |last('max')
        .as('value')
    |log()
predicted
    |join(current)
        .as('predicted','current')
    |alert()
      .crit(lambda: "predicted.value" > 1)
     // .crit(lambda: abs("predicted.value"-"current.value")/"predicted.value" > 0.2)
      .log('/tmp/{alert_name}_log.txt')    
    |log()

I’m using this command to replay:

kapacitor replay-live batch -task test_alert -rec-time -past 100d

I think you might have to use align property in batch query or tolerance property in join.

predicted
|join(current)
    .as('predicted','current')
    .tolerance(1h)