Skip to content

Commit

Permalink
compare
Browse files Browse the repository at this point in the history
  • Loading branch information
wenfeiy-db committed Jan 18, 2024
1 parent caa014c commit 3751d79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/databricks/automl_runtime/forecast/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3751d79

Please sign in to comment.