Rename Forecast.training_horizon into .train_horizon

- we use that shorter name in `urban_meal_delivery.forecasts.*`
  and want to be consistent in the ORM layer as well
This commit is contained in:
Alexander Hess 2021-02-02 13:04:43 +01:00
commit 3f5b4a50bb
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
5 changed files with 63 additions and 15 deletions

View file

@ -79,7 +79,7 @@ class ForecastingModelABC(abc.ABC):
.filter_by(pixel=pixel)
.filter_by(start_at=predict_at)
.filter_by(time_step=self._order_history.time_step)
.filter_by(training_horizon=train_horizon)
.filter_by(train_horizon=train_horizon)
.filter_by(model=self.name)
.first()
) :
@ -94,7 +94,7 @@ class ForecastingModelABC(abc.ABC):
forecasts = db.Forecast.from_dataframe(
pixel=pixel,
time_step=self._order_history.time_step,
training_horizon=train_horizon,
train_horizon=train_horizon,
model=self.name,
data=predictions,
)