Skip to content

Commit

Permalink
quantile_maybe_used
Browse files Browse the repository at this point in the history
  • Loading branch information
elephaint committed Oct 17, 2024
1 parent a4c8b54 commit 8ee4592
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nbs/common.base_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,11 @@
" \"\"\"\n",
" self._check_exog(dataset)\n",
" self._restart_seed(random_seed)\n",
" if \"quantile\" in data_module_kwargs:\n",
" warnings.warn(\"The 'quantile' argument will be deprecated, use 'quantiles' instead.\")\n",
" if quantiles is not None:\n",
" raise ValueError(\"You can't specify quantile and quantiles.\")\n",
" quantiles = [data_module_kwargs.pop(\"quantile\")]\n",
" self._set_quantiles(quantiles)\n",
"\n",
" self.predict_step_size = step_size\n",
Expand Down
7 changes: 7 additions & 0 deletions neuralforecast/common/_base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,13 @@ def predict(
"""
self._check_exog(dataset)
self._restart_seed(random_seed)
if "quantile" in data_module_kwargs:
warnings.warn(
"The 'quantile' argument will be deprecated, use 'quantiles' instead."
)
if quantiles is not None:
raise ValueError("You can't specify quantile and quantiles.")
quantiles = [data_module_kwargs.pop("quantile")]
self._set_quantiles(quantiles)

self.predict_step_size = step_size
Expand Down

0 comments on commit 8ee4592

Please sign in to comment.