From 8ee459213e10e8779108f4f8b682eee7429c4eff Mon Sep 17 00:00:00 2001 From: Olivier Sprangers Date: Thu, 17 Oct 2024 16:31:16 +0200 Subject: [PATCH] quantile_maybe_used --- nbs/common.base_model.ipynb | 5 +++++ neuralforecast/common/_base_model.py | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/nbs/common.base_model.ipynb b/nbs/common.base_model.ipynb index 557f81840..a52bc664c 100644 --- a/nbs/common.base_model.ipynb +++ b/nbs/common.base_model.ipynb @@ -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", diff --git a/neuralforecast/common/_base_model.py b/neuralforecast/common/_base_model.py index 64f80be1f..566c0f599 100644 --- a/neuralforecast/common/_base_model.py +++ b/neuralforecast/common/_base_model.py @@ -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