Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Side Effect When Running make_future_dataframe #1650

Open
tbj128 opened this issue Sep 23, 2024 · 1 comment
Open

Unexpected Side Effect When Running make_future_dataframe #1650

tbj128 opened this issue Sep 23, 2024 · 1 comment

Comments

@tbj128
Copy link

tbj128 commented Sep 23, 2024

The function make_future_dataframe() calls _check_dataframe(...) here which then calls df_utils.check_dataframe(...). This latter method returns lag_regressors_to_remove as part of the response which _check_dataframe(...) then uses to remove lagged regressors from the model here.

However, what this means is that if during inference a dataframe is passed to make_future_dataframe() has a regressor that is completely the same value, the model itself is unexpected mutated. Subsequent calls to the predict function will fail or have unexpected behavior because the model no longer knows about the lagged regressors.

I'm not sure if this was intended, but it's a confusing side effect of calling make_future_dataframe() - perhaps there should be a check so that the model regressors are not touched when calling this dataframe?

@ak14097
Copy link

ak14097 commented Oct 9, 2024

I noticed this issue as well. This changes the model permanently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants