Skip to content

Commit

Permalink
bugfixes in ForecastClient
Browse files Browse the repository at this point in the history
  • Loading branch information
attila-balint-kul committed Jun 22, 2023
1 parent f958618 commit 4547681
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/enfobench/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.9"
__version__ = "0.0.10"
2 changes: 1 addition & 1 deletion src/enfobench/evaluation/_cross_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def cross_validate(
forecasts = []
for cutoff in tqdm(cutoff_dates):
# make sure that there is no data leakage
history = y.loc[y.ds <= cutoff, ["ds", "y"]]
history = y.loc[y.index <= cutoff]

forecast = model.predict(
horizon_length,
Expand Down
5 changes: 3 additions & 2 deletions src/enfobench/evaluation/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def environment(self) -> EnvironmentInfo:
def predict(
self,
horizon: int,
y: pd.DataFrame,
y: pd.Series,
# X: pd.DataFrame,
level: list[int] | None = None,
) -> pd.DataFrame:
Expand All @@ -47,8 +47,9 @@ def predict(
if level is not None:
params["level"] = level

y_df = y.rename_axis('ds').reset_index()
files = {
"y": to_buffer(y),
"y": to_buffer(y_df),
# "X": to_buffer(X),
}

Expand Down
2 changes: 0 additions & 2 deletions src/enfobench/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

import pandas as pd
from pandas import Timedelta

Expand Down

0 comments on commit 4547681

Please sign in to comment.