Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Backward compatibility: missing prediction_intervals #1224

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions nbs/core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1546,9 +1546,12 @@
" \"id_col\": self.id_col,\n",
" \"time_col\": self.time_col,\n",
" \"target_col\": self.target_col,\n",
" \"prediction_intervals\": self.prediction_intervals,\n",
" \"_cs_df\": self._cs_df, # conformity score\n",
" }\n",
" for attr in ['prediction_intervals', '_cs_df']:\n",
" # conformal prediction related attributes was not available < 1.7.6\n",
" if hasattr(self, attr):\n",
" config_dict[attr] = getattr(self, attr, None)\n",
"\n",
" if save_dataset:\n",
" config_dict.update(\n",
" {\n",
Expand Down
7 changes: 5 additions & 2 deletions neuralforecast/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1534,9 +1534,12 @@ def save(
"id_col": self.id_col,
"time_col": self.time_col,
"target_col": self.target_col,
"prediction_intervals": self.prediction_intervals,
"_cs_df": self._cs_df, # conformity score
}
for attr in ["prediction_intervals", "_cs_df"]:
# conformal prediction related attributes was not available < 1.7.6
if hasattr(self, attr):
config_dict[attr] = getattr(self, attr, None)
jmoralez marked this conversation as resolved.
Show resolved Hide resolved

if save_dataset:
config_dict.update(
{
Expand Down
Loading