Skip to content

Commit

Permalink
update cv schema
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez committed Nov 22, 2024
1 parent fb42b70 commit aa016aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions mlforecast/distributed/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,8 @@ def cross_validation(
keep_last_n=keep_last_n,
window_info=window_info,
)
schema = (
self._get_predict_schema()
+ f",cutoff:datetime,{self._base_ts.target_col}:double"
schema = self._get_predict_schema() + Schema(
("cutoff", "datetime"), (self._base_ts.target_col, "double")
)
preds = fa.transform(
partition_results,
Expand Down
5 changes: 4 additions & 1 deletion nbs/distributed.forecast.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,10 @@
" keep_last_n=keep_last_n,\n",
" window_info=window_info,\n",
" )\n",
" schema = self._get_predict_schema() + f',cutoff:datetime,{self._base_ts.target_col}:double'\n",
" schema = (\n",
" self._get_predict_schema() + Schema(\n",
" ('cutoff', 'datetime'), (self._base_ts.target_col, 'double'))\n",
" )\n",
" preds = fa.transform(\n",
" partition_results,\n",
" DistributedMLForecast._predict,\n",
Expand Down

0 comments on commit aa016aa

Please sign in to comment.