diff --git a/kats/models/bayesian_var.py b/kats/models/bayesian_var.py index 0279824a..84f15c79 100644 --- a/kats/models/bayesian_var.py +++ b/kats/models/bayesian_var.py @@ -442,7 +442,7 @@ def predict( [Y_curr, look_ahead_pred[:, np.newaxis]], axis=1 ) - times += ahead_times + times += list(ahead_times) forecast_length = len(times) diff --git a/kats/models/globalmodel/backtester.py b/kats/models/globalmodel/backtester.py index 2975eca3..f7ee6341 100644 --- a/kats/models/globalmodel/backtester.py +++ b/kats/models/globalmodel/backtester.py @@ -438,7 +438,8 @@ def _evaluate( ] ans.extend(tmp_ans) ensemble_fcst = np.median( - np.column_stack(fcst_all[i][k][j] for i in range(n)), axis=1 + np.column_stack(fcst_all[i][k][j] for i in range(n)), + axis=1, ) evl = eval_func(ensemble_fcst, tmp_actuals) evl["step"] = j diff --git a/kats/models/metalearner/metalearner_hpt.py b/kats/models/metalearner/metalearner_hpt.py index 8c03ed79..56d027df 100644 --- a/kats/models/metalearner/metalearner_hpt.py +++ b/kats/models/metalearner/metalearner_hpt.py @@ -260,7 +260,7 @@ def __init__( ) # pyre-fixme[4]: Attribute must be annotated. self._dim_output_num = ( - self._target_num.shape[1] if self.numerical_idx else 0 + self._target_num.shape[1] if self._target_num is not None else 0 ) self._get_target_cat() self._validate_data()