From 3751d7930039684fc9c3d4e92878c195452bbd3f Mon Sep 17 00:00:00 2001 From: wenfeiy-db Date: Wed, 17 Jan 2024 22:02:48 -0800 Subject: [PATCH] compare --- runtime/databricks/automl_runtime/forecast/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/databricks/automl_runtime/forecast/utils.py b/runtime/databricks/automl_runtime/forecast/utils.py index 30def4f1..ecdc0afc 100644 --- a/runtime/databricks/automl_runtime/forecast/utils.py +++ b/runtime/databricks/automl_runtime/forecast/utils.py @@ -111,6 +111,7 @@ def get_validation_horizon(df: pd.DataFrame, horizon: int, unit: str) -> int: horizon_dateoffset = pd.DateOffset(**DATE_OFFSET_KEYWORD_MAP[unit]) * horizon try: + df["ds"] = pd.to_datetime(df["ds"]) if MIN_HORIZONS * horizon_dateoffset + df["ds"].min() <= df["ds"].max(): return horizon except OverflowError: