Skip to content

Commit

Permalink
Moved feat type infer
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherbunn committed Oct 26, 2023
1 parent 2f4ad3c commit 5b7f213
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 8 additions & 0 deletions evalml/pipelines/multiseries_regression_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
TimeSeriesRegressionPipeline,
)
from evalml.problem_types import ProblemTypes
from evalml.utils import infer_feature_types


class MultiseriesRegressionPipeline(TimeSeriesRegressionPipeline):
Expand Down Expand Up @@ -129,8 +130,15 @@ def predict_in_sample(
)
# Order series ID columns to be same as X_train
y_unstacked = y_unstacked[y_train_unstacked.columns]

X_train_unstacked = infer_feature_types(X_train_unstacked)
y_train_unstacked = infer_feature_types(y_train_unstacked)
X_unstacked = infer_feature_types(X_unstacked)
y_unstacked = infer_feature_types(y_unstacked)

print("inuns_X", X_unstacked, X_unstacked.ww.schema)
print("inuns_X_train", X_train_unstacked, X_train_unstacked.ww.schema)

unstacked_predictions = super().predict_in_sample(
X_unstacked,
y_unstacked,
Expand Down
6 changes: 0 additions & 6 deletions evalml/pipelines/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1435,10 +1435,6 @@ def unstack_multiseries(
# Reset the axes now that they've been unstacked, keep time info in X
X_unstacked = X_unstacked.reset_index()
y_unstacked = y_unstacked.reset_index(drop=True)

X_unstacked = infer_feature_types(X_unstacked)
y_unstacked = infer_feature_types(y_unstacked)

return X_unstacked, y_unstacked


Expand Down Expand Up @@ -1495,8 +1491,6 @@ def stack_data(
)
stacked_series = pd.concat([series_id_col, stacked_series], axis=1)

stacked_series = infer_feature_types(stacked_series)

return stacked_series


Expand Down

0 comments on commit 5b7f213

Please sign in to comment.