Skip to content

Commit 11d3448

Browse files
committed
fixed bug in tuning for prophet
1 parent 75c0f05 commit 11d3448

File tree

1 file changed

+2
-2
lines changed
  • ads/opctl/operator/lowcode/forecast/model

1 file changed

+2
-2
lines changed

ads/opctl/operator/lowcode/forecast/model/prophet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def objective(trial):
118118
)
119119

120120
# Manual workaround because pandas 1.x dropped support for M and Y
121-
interval = self.spec.horizon.interval
122-
unit = self.spec.horizon.interval_unit
121+
interval = self.spec.horizon
122+
unit = self.spec.freq.split('-')[0] if self.spec.freq else None
123123
if unit == "M":
124124
unit = "D"
125125
interval = interval * 30.5

0 commit comments

Comments
 (0)