winedarksea / AutoTS

Automated Time Series Forecasting
MIT License
1.1k stars 100 forks source link

In AutoTS class, custom dataframe is not being picked as initial_template #213

Closed govarsha closed 9 months ago

govarsha commented 9 months ago

Describe the bug

In autots/evaluator/auto_ts.py,

For AutoTS, when we pass a dataframe as initial_template 326. initial_template = str(initial_template).lower() Above line converts the dataframe to str and the following if case fails 354. elif isinstance(initial_template, pd.DataFrame) So finally it ends up creating a random template instead of using the given dataframe.

To Reproduce Create AutoTS object by passing some dataframe as initial_template. You will see the following log: Input initial_template unrecognized. Using Random.

Expected behavior It should just take that dataframe as initial_template.

winedarksea commented 9 months ago

The official way to do this is using the model.import_template(df) which has more options about how to do the import

govarsha commented 9 months ago

Yeah sure, I missed that import_template method. And thanks for the quick modification.