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

Fatal error on SeasonalityMotifImputer transformer #218

Open
emobs opened this issue Dec 20, 2023 · 2 comments
Open

Fatal error on SeasonalityMotifImputer transformer #218

emobs opened this issue Dec 20, 2023 · 2 comments

Comments

@emobs
Copy link

emobs commented Dec 20, 2023

Sorry, hope these are true bugs and I'm not spamming you with errors here...

While running this model following the CurrentModels saved file:
{"model_number": 68, "model_name": "LastValueNaive", "model_param_dict": {}, "model_transform_dict": {"fillna": "SeasonalityMotifImputer", "transformations": {"0": "AlignLastValue", "1": "SinTrend"}, "transformation_params": {"0": {"rows": 1, "lag": 2, "method": "additive", "strength": 1.0, "first_value_only": false}, "1": {}}}}

The transformer throws an error:
autots/evaluator/auto_model.py:1152: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

With a narrower transformer list this error is not thrown so I'm sure the transformer is the cause. Please let me know if you need more information.

--edit--
Also on the SeasonalityMotifImputerLinMix transformer this error is thrown.

@winedarksea
Copy link
Owner

This worked just fine:

import numpy as np
from autots import load_daily
df = load_daily(long=False)
from autots import model_forecast
trans_params = {"fillna": "SeasonalityMotifImputer", "transformations": {"0": "AlignLastValue", "1": "SinTrend"}, "transformation_params": {"0": {"rows": 1, "lag": 2, "method": "additive", "strength": 1.0, "first_value_only": False}, "1": {}}}
df.iloc[100] = np.nan
prediction = model_forecast(
    df_train=df,
    forecast_length=28,
    model_name="LastValueNaive",
    model_param_dict={},
    model_transform_dict=trans_params,
)
prediction.plot_grid(df)

given that the error is in auto_model.py this is likely not a transformer issue but a higher level AutoTS bug

winedarksea added a commit that referenced this issue Dec 20, 2023
Possibly helps #218
@winedarksea
Copy link
Owner

The error is originating in unpack_ensemble_models according to your code.

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