Repository: ourownstory/neural_prophet

Issue:
[enhancement] remove support for dicts of df as input
We have been warning about dicts being deprecated as inputs.
Now we remove support for them - simplifying the codebase in our next major release.


Discussion:

Resolving patch:
diff --git a/neuralprophet/df_utils.py b/neuralprophet/df_utils.py
--- a/neuralprophet/df_utils.py
+++ b/neuralprophet/df_utils.py
@@ -24,10 +24,9 @@ class ShiftScale:
 
 def prep_or_copy_df(df):
     """Copy df if it contains the ID column. Creates ID column with '__df__' if it is a df with a single time series.
-    Converts a dict to the right df format (it will be deprecated soon).
     Parameters
     ----------
-        df : pd.DataFrame, dict (deprecated)
+        df : pd.DataFrame
             df or dict containing data
     Returns
     -------
@@ -37,12 +36,9 @@ def prep_or_copy_df(df):
             whether the ID col was present
         bool
             wheter it is a single time series
-        bool
-            wheter a dict was received
     """
     received_ID_col = False
     received_single_time_series = True
-    received_dict = False
     if isinstance(df, pd.DataFrame):
         new_df = df.copy(deep=True)
         if "ID" in df.columns:
@@ -56,27 +52,18 @@ def prep_or_copy_df(df):
         else:
             new_df["ID"] = "__df__"
             log.debug("Received df with single time series")
-    elif isinstance(df, dict):
-        if len(df) > 1:
-            received_single_time_series = False
-        received_dict = True
-        log.warning("dict as input are deprecated. Please, use dataframes with ‘ID’ column instead")
-        new_df = pd.DataFrame()
-        for df_name, df_i in df.items():
-            df_i["ID"] = df_name
-            new_df = pd.concat((new_df, df_i.copy(deep=True)), ignore_index=True)
     elif df is None:
         raise ValueError("df is None")
     else:
-        raise ValueError("Please, insert valid df type (i.e. pd.DataFrame, dict)")
+        raise ValueError("Please, insert valid df type (pd.DataFrame)")
 
     # list of IDs
     id_list = list(new_df.ID.unique())
 
-    return new_df, received_ID_col, received_single_time_series, received_dict, id_list
+    return new_df, received_ID_col, received_single_time_series, id_list
 
 
-def return_df_in_original_format(df, received_ID_col=False, received_single_time_series=True, received_dict=False):
+def return_df_in_original_format(df, received_ID_col=False, received_single_time_series=True):
     """Return dataframe in the original format.
 
     Parameters
@@ -87,22 +74,16 @@ def return_df_in_original_format(df, received_ID_col=False, received_single_time
             whether the ID col was present
         received_single_time_series: bool
             wheter it is a single time series
-        received_dict: bool
-            wheter data originated from a dict
     Returns
     -------
-        pd.Dataframe, dict (deprecated)
+        pd.Dataframe
             original input format
     """
-    if received_dict:
-        new_df = {df_name: df_i.loc[:, df.columns != "ID"].copy(deep=True) for (df_name, df_i) in df.groupby("ID")}
-        log.info("Returning dict")
-    else:
-        new_df = df.copy(deep=True)
-        if not received_ID_col and received_single_time_series:
-            assert len(new_df["ID"].unique()) == 1
-            new_df.drop("ID", axis=1, inplace=True)
-            log.info("Returning df with no ID column")
+    new_df = df.copy(deep=True)
+    if not received_ID_col and received_single_time_series:
+        assert len(new_df["ID"].unique()) == 1
+        new_df.drop("ID", axis=1, inplace=True)
+        log.info("Returning df with no ID column")
     return new_df
 
 
@@ -305,7 +286,7 @@ def init_data_params(
             ShiftScale entries containing ``shift`` and ``scale`` parameters for each column
     """
     # Compute Global data params
-    df, _, _, _, _ = prep_or_copy_df(df)
+    df, _, _, _ = prep_or_copy_df(df)
     df_merged = df.copy(deep=True).drop("ID", axis=1)
     global_data_params = data_params_definition(
         df_merged, normalize, config_lagged_regressors, config_regressors, config_events
@@ -512,7 +493,7 @@ def check_dataframe(df, check_y=True, covariates=None, regressors=None, events=N
         pd.DataFrame or dict
             checked dataframe
     """
-    df, _, _, _, _ = prep_or_copy_df(df)
+    df, _, _, _ = prep_or_copy_df(df)
     checked_df = pd.DataFrame()
     regressors_to_remove = []
     for df_name, df_i in df.groupby("ID"):
@@ -666,7 +647,7 @@ def _crossvalidation_with_time_threshold(df, n_lags, n_forecasts, k, fold_pct, f
     min_train = total_samples - samples_fold - (k - 1) * (samples_fold - samples_overlap)
     assert min_train >= samples_fold
     folds = []
-    df_fold, _, _, _, _ = prep_or_copy_df(df)
+    df_fold, _, _, _ = prep_or_copy_df(df)
     for i in range(k, 0, -1):
         threshold_time_stamp = find_time_threshold(df_fold, n_lags, n_forecasts, samples_fold, inputs_overbleed=True)
         df_train, df_val = split_considering_timestamp(
@@ -725,7 +706,7 @@ def crossvalidation_split_df(
 
             validation data
     """
-    df, _, _, _, _ = prep_or_copy_df(df)
+    df, _, _, _ = prep_or_copy_df(df)
     if len(df["ID"].unique()) == 1:
         for df_name, df_i in df.groupby("ID"):
             folds = _crossvalidation_split_df(df_i, n_lags, n_forecasts, k, fold_pct, fold_overlap_pct)
@@ -783,7 +764,7 @@ def double_crossvalidation_split_df(df, n_lags, n_forecasts, k, valid_pct, test_
         tuple of k tuples [(folds_val, folds_test), …]
             elements same as :meth:`crossvalidation_split_df` returns
     """
-    df, _, _, _, _ = prep_or_copy_df(df)
+    df, _, _, _ = prep_or_copy_df(df)
     if len(df["ID"].unique()) > 1:
         raise NotImplementedError("double_crossvalidation_split_df not implemented for df with many time series")
     fold_pct_test = float(test_pct) / k
@@ -943,7 +924,7 @@ def split_df(df, n_lags, n_forecasts, valid_p=0.2, inputs_overbleed=True, local_
         pd.DataFrame, dict
             validation data
     """
-    df, _, _, _, _ = prep_or_copy_df(df)
+    df, _, _, _ = prep_or_copy_df(df)
     df_train = pd.DataFrame()
     df_val = pd.DataFrame()
     if local_split:
@@ -1330,7 +1311,7 @@ def infer_frequency(df, freq, n_lags, min_freq_percentage=0.7):
             Valid frequency tag according to major frequency.
 
     """
-    df, _, _, _, _ = prep_or_copy_df(df)
+    df, _, _, _ = prep_or_copy_df(df)
     freq_df = list()
     for df_name, df_i in df.groupby("ID"):
         freq_df.append(_infer_frequency(df_i, freq, min_freq_percentage))
@@ -1374,7 +1355,6 @@ def create_dict_for_events_or_regressors(df, other_df, other_df_name):  # Not su
             received_ID_col,
             _,
             _,
-            _,
         ) = prep_or_copy_df(other_df)
         # if other_df does not contain ID, create dictionary with original ID with the same other_df for each ID
         if not received_ID_col:
diff --git a/neuralprophet/forecaster.py b/neuralprophet/forecaster.py
--- a/neuralprophet/forecaster.py
+++ b/neuralprophet/forecaster.py
@@ -671,7 +671,7 @@ def fit(self, df, freq="auto", validation_df=None, progress="bar", minimal=False
 
         # Setup
         # List of different time series IDs, for global-local modelling (if enabled)
-        df, _, _, _, self.id_list = df_utils.prep_or_copy_df(df)
+        df, _, _, self.id_list = df_utils.prep_or_copy_df(df)
 
         # When only one time series is input, self.id_list = ['__df__']
         self.nb_trends_modelled = len(self.id_list) if self.config_trend.trend_global_local == "local" else 1
@@ -689,7 +689,7 @@ def fit(self, df, freq="auto", validation_df=None, progress="bar", minimal=False
             )
 
         # Pre-processing
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         df = self._check_dataframe(df, check_y=True, exogenous=True)
         self.data_freq = df_utils.infer_frequency(df, n_lags=self.max_lags, freq=freq)
         df = self._handle_missing_data(df, freq=self.data_freq)
@@ -701,7 +701,7 @@ def fit(self, df, freq="auto", validation_df=None, progress="bar", minimal=False
         if validation_df is None:
             metrics_df = self._train(df, minimal=minimal, continue_training=continue_training)
         else:
-            df_val, _, _, _, _ = df_utils.prep_or_copy_df(validation_df)
+            df_val, _, _, _ = df_utils.prep_or_copy_df(validation_df)
             df_val = self._check_dataframe(df_val, check_y=False, exogenous=False)
             df_val = self._handle_missing_data(df_val, freq=self.data_freq)
             metrics_df = self._train(df, df_val=df_val, minimal=minimal, continue_training=continue_training)
@@ -760,7 +760,7 @@ def predict(self, df, decompose=True, raw=False):
             log.warning("Raw forecasts are incompatible with plotting utilities")
         if self.fitted is False:
             raise ValueError("Model has not been fitted. Predictions will be random.")
-        df, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(df)
+        df, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(df)
         # to get all forecasteable values with df given, maybe extend into future:
         df, periods_added = self._maybe_extend_df(df)
         df = self._prepare_dataframe_to_predict(df)
@@ -781,9 +781,7 @@ def predict(self, df, decompose=True, raw=False):
                 if periods_added[df_name] > 0:
                     fcst = fcst[: -periods_added[df_name]]
             forecast = pd.concat((forecast, fcst), ignore_index=True)
-        df = df_utils.return_df_in_original_format(
-            forecast, received_ID_col, received_single_time_series, received_dict
-        )
+        df = df_utils.return_df_in_original_format(forecast, received_ID_col, received_single_time_series)
         self.predict_steps = self.n_forecasts
         return df
 
@@ -799,7 +797,7 @@ def test(self, df):
             pd.DataFrame
                 evaluation metrics
         """
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         if self.fitted is False:
             log.warning("Model has not been fitted. Test results will be random.")
         df = self._check_dataframe(df, check_y=True, exogenous=True)
@@ -926,7 +924,7 @@ def split_df(self, df, freq="auto", valid_p=0.2, local_split=False):
             1	2022-12-13	8.02	data2
             2	2022-12-13	8.30	data3
         """
-        df, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(df)
+        df, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(df)
         df = self._check_dataframe(df, check_y=False, exogenous=False)
         freq = df_utils.infer_frequency(df, n_lags=self.max_lags, freq=freq)
         df = self._handle_missing_data(df, freq=freq, predicting=False)
@@ -938,12 +936,8 @@ def split_df(self, df, freq="auto", valid_p=0.2, local_split=False):
             inputs_overbleed=True,
             local_split=local_split,
         )
-        df_train = df_utils.return_df_in_original_format(
-            df_train, received_ID_col, received_single_time_series, received_dict
-        )
-        df_val = df_utils.return_df_in_original_format(
-            df_val, received_ID_col, received_single_time_series, received_dict
-        )
+        df_train = df_utils.return_df_in_original_format(df_train, received_ID_col, received_single_time_series)
+        df_val = df_utils.return_df_in_original_format(df_val, received_ID_col, received_single_time_series)
         return df_train, df_val
 
     def crossvalidation_split_df(
@@ -1092,7 +1086,7 @@ def crossvalidation_split_df(
             1	2022-12-10	8.25	data2
             2	2022-12-10	7.55	data3
         """
-        df, received_ID_col, received_single_time_series, _, _ = df_utils.prep_or_copy_df(df)
+        df, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(df)
         df = self._check_dataframe(df, check_y=False, exogenous=False)
         freq = df_utils.infer_frequency(df, n_lags=self.max_lags, freq=freq)
         df = self._handle_missing_data(df, freq=freq, predicting=False)
@@ -1137,7 +1131,7 @@ def double_crossvalidation_split_df(self, df, freq="auto", k=5, valid_pct=0.10,
             tuple of k tuples [(folds_val, folds_test), …]
                 elements same as :meth:`crossvalidation_split_df` returns
         """
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         df = self._check_dataframe(df, check_y=False, exogenous=False)
         freq = df_utils.infer_frequency(df, n_lags=self.max_lags, freq=freq)
         df = self._handle_missing_data(df, freq=freq, predicting=False)
@@ -1172,7 +1166,7 @@ def create_df_with_events(self, df, events_df):
                 "The events configs should be added to the NeuralProphet object (add_events fn)"
                 "before creating the data with events features"
             )
-        df, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(df)
+        df, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(df)
         df = self._check_dataframe(df, check_y=True, exogenous=False)
         df_dict_events = df_utils.create_dict_for_events_or_regressors(df, events_df, "events")
         df_created = pd.DataFrame()
@@ -1186,9 +1180,7 @@ def create_df_with_events(self, df, events_df):
             )
             df_aux["ID"] = df_name
             df_created = pd.concat((df_created, df_aux), ignore_index=True)
-        df = df_utils.return_df_in_original_format(
-            df_created, received_ID_col, received_single_time_series, received_dict
-        )
+        df = df_utils.return_df_in_original_format(df_created, received_ID_col, received_single_time_series)
         return df
 
     def make_future_dataframe(self, df, events_df=None, regressors_df=None, periods=None, n_historic_predictions=False):
@@ -1242,7 +1234,7 @@ def make_future_dataframe(self, df, events_df=None, regressors_df=None, periods=
             >>> forecast = m.predict(df=future)
 
         """
-        df, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(df)
+        df, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(df)
         events_dict = df_utils.create_dict_for_events_or_regressors(df, events_df, "events")
         regressors_dict = df_utils.create_dict_for_events_or_regressors(df, regressors_df, "regressors")
 
@@ -1259,7 +1251,7 @@ def make_future_dataframe(self, df, events_df=None, regressors_df=None, periods=
             df_future_dataframe = pd.concat((df_future_dataframe, df_aux), ignore_index=True)
 
         df_future = df_utils.return_df_in_original_format(
-            df_future_dataframe, received_ID_col, received_single_time_series, received_dict
+            df_future_dataframe, received_ID_col, received_single_time_series
         )
         return df_future
 
@@ -1317,7 +1309,7 @@ def predict_trend(self, df, quantile=0.5):
         if quantile is not None and not (0 < quantile < 1):
             raise ValueError("The quantile specified need to be a float in-between (0,1)")
 
-        df, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(df)
+        df, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(df)
         df = self._check_dataframe(df, check_y=False, exogenous=False)
         df = self._normalize(df)
         df_trend = pd.DataFrame()
@@ -1340,9 +1332,7 @@ def predict_trend(self, df, quantile=0.5):
             trend = trend * data_params["y"].scale + data_params["y"].shift
             df_aux = pd.DataFrame({"ds": df_i["ds"], "trend": trend, "ID": df_name})
             df_trend = pd.concat((df_trend, df_aux), ignore_index=True)
-        df = df_utils.return_df_in_original_format(
-            df_trend, received_ID_col, received_single_time_series, received_dict
-        )
+        df = df_utils.return_df_in_original_format(df_trend, received_ID_col, received_single_time_series)
         return df
 
     def predict_seasonal_components(self, df, quantile=0.5):
@@ -1363,7 +1353,7 @@ def predict_seasonal_components(self, df, quantile=0.5):
         if quantile is not None and not (0 < quantile < 1):
             raise ValueError("The quantile specified need to be a float in-between (0,1)")
 
-        df, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(df)
+        df, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(df)
         df = self._check_dataframe(df, check_y=False, exogenous=False)
         df = self._normalize(df)
         df_seasonal = pd.DataFrame()
@@ -1410,9 +1400,7 @@ def predict_seasonal_components(self, df, quantile=0.5):
                     predicted[name] = predicted[name] * data_params["y"].scale
             df_aux = pd.DataFrame({"ds": df_i["ds"], "ID": df_i["ID"], **predicted})
             df_seasonal = pd.concat((df_seasonal, df_aux), ignore_index=True)
-        df = df_utils.return_df_in_original_format(
-            df_seasonal, received_ID_col, received_single_time_series, received_dict
-        )
+        df = df_utils.return_df_in_original_format(df_seasonal, received_ID_col, received_single_time_series)
         return df
 
     def set_true_ar_for_eval(self, true_ar_weights):
@@ -1488,7 +1476,7 @@ def plot(self, fcst, df_name=None, ax=None, xlabel="ds", ylabel="y", figsize=(10
                 * ``matplotlib``: use matplotlib for plotting
                 * (default) ``default``: use the global default for plotting
         """
-        fcst, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(fcst)
+        fcst, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(fcst)
         if not received_single_time_series:
             if df_name not in fcst["ID"].unique():
                 assert len(fcst["ID"].unique()) > 1
@@ -1595,7 +1583,7 @@ def get_latest_forecast(
         """
         if self.max_lags == 0:
             raise ValueError("Use the standard plot function for models without lags.")
-        fcst, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(fcst)
+        fcst, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(fcst)
         if not received_single_time_series:
             if df_name not in fcst["ID"].unique():
                 assert len(fcst["ID"].unique()) > 1
@@ -1663,7 +1651,7 @@ def plot_latest_forecast(
         """
         if self.max_lags == 0:
             raise ValueError("Use the standard plot function for models without lags.")
-        fcst, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(fcst)
+        fcst, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(fcst)
         if not received_single_time_series:
             if df_name not in fcst["ID"].unique():
                 assert len(fcst["ID"].unique()) > 1
@@ -1746,7 +1734,7 @@ def plot_components(
             matplotlib.axes.Axes
                 plot of NeuralProphet components
         """
-        fcst, received_ID_col, received_single_time_series, received_dict, _ = df_utils.prep_or_copy_df(fcst)
+        fcst, received_ID_col, received_single_time_series, _ = df_utils.prep_or_copy_df(fcst)
         if not received_single_time_series:
             if df_name not in fcst["ID"].unique():
                 assert len(fcst["ID"].unique()) > 1
@@ -1976,7 +1964,7 @@ def _create_dataset(self, df, predict_mode):
         -------
             TimeDataset
         """
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         return time_dataset.GlobalTimeDataset(
             df,
             predict_mode=predict_mode,
@@ -2139,7 +2127,7 @@ def _handle_missing_data(self, df, freq, predicting=False):
         -------
             pre-processed df
         """
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         df_handled_missing = pd.DataFrame()
         for df_name, df_i in df.groupby("ID"):
             df_handled_missing_aux = self.__handle_missing_data(df_i, freq, predicting).copy(deep=True)
@@ -2170,7 +2158,7 @@ def _check_dataframe(self, df, check_y=True, exogenous=True):
             pd.DataFrame
                 checked dataframe
         """
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         df, regressors_to_remove = df_utils.check_dataframe(
             df=df,
             check_y=check_y,
@@ -2249,7 +2237,7 @@ def _normalize(self, df):
         -------
             df: pd.DataFrame, normalized
         """
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         df_norm = pd.DataFrame()
         for df_name, df_i in df.groupby("ID"):
             data_params = self.config_normalization.get_data_params(df_name)
@@ -2271,7 +2259,7 @@ def _init_train_loader(self, df):
         -------
             torch DataLoader
         """
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         # if not self.fitted:
         self.config_normalization.init_data_params(
             df=df,
@@ -2316,7 +2304,7 @@ def _init_val_loader(self, df):
         -------
             torch DataLoader
         """
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         df = self._normalize(df)
         dataset = self._create_dataset(df, predict_mode=False)
         loader = DataLoader(dataset, batch_size=min(1024, len(dataset)), shuffle=False, drop_last=False)
@@ -2343,12 +2331,12 @@ def _train(self, df, df_val=None, minimal=False, continue_training=False):
                 metrics
         """
         # Set up data the training dataloader
-        df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+        df, _, _, _ = df_utils.prep_or_copy_df(df)
         train_loader = self._init_train_loader(df)
 
         # Set up data the validation dataloader
         if df_val is not None:
-            df_val, _, _, _, _ = df_utils.prep_or_copy_df(df_val)
+            df_val, _, _, _ = df_utils.prep_or_copy_df(df_val)
             val_loader = self._init_val_loader(df_val)
 
         # TODO: check how to handle this with Lightning (the rest moved to utils.configure_denormalization)


Test patch:
diff --git a/tests/test_integration.py b/tests/test_integration.py
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -63,7 +63,7 @@ def test_df_utils_func():
     df, _ = df_utils.check_dataframe(df, check_y=False)
 
     # test find_time_threshold
-    df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+    df, _, _, _ = df_utils.prep_or_copy_df(df)
     time_threshold = df_utils.find_time_threshold(df, n_lags=2, n_forecasts=2, valid_p=0.2, inputs_overbleed=True)
     df_train, df_val = df_utils.split_considering_timestamp(
         df, n_lags=2, n_forecasts=2, inputs_overbleed=True, threshold_time_stamp=time_threshold
@@ -1563,82 +1563,6 @@ def test_drop_missing_values_after_imputation():
     forecast = m2.predict(df=future)
 
 
-def test_dict_input():
-    ### Deprecated - dict as input
-    log.info("Global Modeling - Dict as input")
-    df = pd.read_csv(PEYTON_FILE, nrows=512)
-    df1_0 = df.iloc[:128, :].copy(deep=True)
-    df2_0 = df.iloc[128:256, :].copy(deep=True)
-    df3_0 = df.iloc[256:384, :].copy(deep=True)
-    df4_0 = df.iloc[384:, :].copy(deep=True)
-    train_input = {0: df1_0, 1: {"df1": df1_0, "df2": df2_0}, 2: {"df1": df1_0, "df2": df2_0}}
-    test_input = {0: df3_0, 1: {"df1": df3_0}, 2: {"df1": df3_0, "df2": df4_0}}
-    info_input = {
-        0: "Testing df train / df test - no events, no regressors",
-        1: "Testing dict df train / df test - no events, no regressors",
-        2: "Testing dict df train / dict df test - no events, no regressors",
-    }
-    for i in range(0, 3):
-        log.info(info_input[i])
-        m = NeuralProphet(
-            n_forecasts=2,
-            n_lags=10,
-            epochs=EPOCHS,
-            batch_size=BATCH_SIZE,
-            learning_rate=LR,
-            trend_global_local="global",
-            season_global_local="global",
-        )
-        metrics = m.fit(train_input[i], freq="D")
-        forecast = m.predict(df=test_input[i])
-        forecast_trend = m.predict_trend(df=test_input[i])
-        forecast_seasonal_componets = m.predict_seasonal_components(df=test_input[i])
-        if PLOT:
-            forecast = forecast if isinstance(forecast, dict) else {"df": forecast}
-            for key in forecast:
-                fig1 = m.plot(forecast[key])
-                if key != "df":
-                    fig2 = m.plot_parameters(df_name=key)
-                else:
-                    fig2 = m.plot_parameters()
-    with pytest.raises(ValueError):
-        forecast = m.predict({"df4": df4_0})
-    log.info("Error - dict with names not provided in the train dict (not in the data params dict)")
-    with pytest.raises(ValueError):
-        metrics = m.test({"df4": df4_0})
-    log.info("Error - dict with names not provided in the train dict (not in the data params dict)")
-    m = NeuralProphet(
-        n_forecasts=2,
-        n_lags=10,
-        epochs=EPOCHS,
-        batch_size=BATCH_SIZE,
-        learning_rate=LR,
-        trend_global_local="global",
-        season_global_local="global",
-    )
-    m.fit({"df1": df1_0, "df2": df2_0}, freq="D")
-    with pytest.raises(ValueError):
-        forecast = m.predict({"df4": df4_0})
-    # log.info("unknown_data_normalization was not set to True")
-    with pytest.raises(ValueError):
-        metrics = m.test({"df4": df4_0})
-    # log.info("unknown_data_normalization was not set to True")
-    with pytest.raises(ValueError):
-        forecast_trend = m.predict_trend({"df4": df4_0})
-    # log.info("unknown_data_normalization was not set to True")
-    with pytest.raises(ValueError):
-        forecast_seasonal_componets = m.predict_seasonal_components({"df4": df4_0})
-    # log.info("unknown_data_normalization was not set to True")
-    # Set unknown_data_normalization to True - now there should be no errors
-    m.config_normalization.unknown_data_normalization = True
-    forecast = m.predict({"df4": df4_0})
-    metrics = m.test({"df4": df4_0})
-    forecast_trend = m.predict_trend({"df4": df4_0})
-    forecast_seasonal_componets = m.predict_seasonal_components({"df4": df4_0})
-    m.plot_parameters(df_name="df1")
-    m.plot_parameters()
-
-
 def test_predict_raw():
     df = pd.read_csv(PEYTON_FILE, nrows=NROWS)
 
diff --git a/tests/test_unit.py b/tests/test_unit.py
--- a/tests/test_unit.py
+++ b/tests/test_unit.py
@@ -104,7 +104,7 @@ def test_normalize():
         learning_rate=LR,
         normalize="soft",
     )
-    df, _, _, _, _ = df_utils.prep_or_copy_df(df)
+    df, _, _, _ = df_utils.prep_or_copy_df(df)
     # with config
     m.config_normalization.init_data_params(df, m.config_lagged_regressors, m.config_regressors, m.config_events)
     df_norm = m._normalize(df)