Skip to content

Commit

Permalink
remove last _create component staker
Browse files Browse the repository at this point in the history
  • Loading branch information
ourownstory committed Aug 31, 2024
1 parent 853fb21 commit 81868a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
11 changes: 0 additions & 11 deletions neuralprophet/data/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,14 +630,3 @@ def _create_dataset(model, df, predict_mode, prediction_frequency=None, componen
components_stacker=components_stacker,
# config_train=model.config_train, # no longer needed since JIT tabularization.
)


def _create_components_stacker(n_lags, n_forecasts, max_lags, config_seasonality, config_lagged_regressors):
return utils_time_dataset.ComponentStacker(
n_lags=n_lags,
n_forecasts=n_forecasts,
max_lags=max_lags,
config_seasonality=config_seasonality,
lagged_regressor_config=config_lagged_regressors,
feature_indices={},
)
4 changes: 2 additions & 2 deletions neuralprophet/forecaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from neuralprophet.data.process import (
_check_dataframe,
_convert_raw_predictions_to_raw_df,
_create_components_stacker,
_create_dataset,
_handle_missing_data,
_prepare_dataframe_to_predict,
Expand Down Expand Up @@ -1216,12 +1215,13 @@ def fit(
)
# df_val, _, _, _ = df_utils.prep_or_copy_df(df_val)
df_val = _normalize(df=df_val, config_normalization=self.config_normalization)
val_components_stacker = _create_components_stacker(
val_components_stacker = utils_time_dataset.ComponentStacker(
n_lags=self.n_lags,
max_lags=self.max_lags,
n_forecasts=self.n_forecasts,
config_seasonality=self.config_seasonality,
config_lagged_regressors=self.config_lagged_regressors,
feature_indices={},
)
dataset_val = _create_dataset(self, df_val, predict_mode=False, components_stacker=val_components_stacker)
loader_val = DataLoader(dataset_val, batch_size=min(1024, len(dataset_val)), shuffle=False, drop_last=False)
Expand Down

0 comments on commit 81868a9

Please sign in to comment.