Skip to content

Commit abf12da

Browse files
authored
fixed bug in historical forecasts not training model for first time if retrain is False (#1005)
1 parent 2292b82 commit abf12da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

darts/models/forecasting/forecasting_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def historical_forecasts(
435435

436436
# train_cov = covariates.drop_after(pred_time) if covariates else None
437437

438-
if retrain:
438+
if retrain or not self._fit_called:
439439
self._fit_wrapper(
440440
series=train,
441441
past_covariates=past_covariates,

0 commit comments

Comments
 (0)