Skip to content
New issue

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

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

Already on GitHub? # to your account

Forecast model crash when converting date into float #1065

Closed
1 of 2 tasks
xzdandy opened this issue Sep 7, 2023 · 2 comments
Closed
1 of 2 tasks

Forecast model crash when converting date into float #1065

xzdandy opened this issue Sep 7, 2023 · 2 comments
Labels
Bug 🐞 EVA is not working as expected Crash 💥 EVA is crashing
Milestone

Comments

@xzdandy
Copy link
Collaborator

xzdandy commented Sep 7, 2023

Search before asking

  • I have searched the EvaDB issues and found no similar bug report.

Bug

In the Colab notebook, we tried to use the forecast capability of EvaDB to train a home price forecasting model. The below query

cursor.query("""
  CREATE FUNCTION IF NOT EXISTS HomeSaleForecast FROM
    (
      SELECT saledate, ma 
      FROM postgres_data.home_sales 
      WHERE type = "house" AND bedrooms = 2
    )
  TYPE Forecasting
  PREDICT 'ma'
  TIME 'saledate'
  FREQUENCY 'M';
""").df()

failed with the follow error message:

ERROR:evadb.utils.logging_manager:could not convert string to float: '30/09/2007'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/plan_executor.py", line 178, in execute_plan
    yield from output
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/create_function_executor.py", line 316, in exec
    ) = self.handle_forecasting_function()
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/create_function_executor.py", line 217, in handle_forecasting_function
    model.fit(data)
  File "/usr/local/lib/python3.10/dist-packages/statsforecast/core.py", line 878, in fit
    self._prepare_fit(df, sort_df)
  File "/usr/local/lib/python3.10/dist-packages/statsforecast/core.py", line 833, in _prepare_fit
    df_process = DataFrameProcessing(df, sort_df)
  File "/usr/local/lib/python3.10/dist-packages/statsforecast/core.py", line 459, in __init__
    self.__call__()
  File "/usr/local/lib/python3.10/dist-packages/statsforecast/core.py", line 476, in __call__
    [
  File "/usr/local/lib/python3.10/dist-packages/statsforecast/core.py", line 477, in <listcomp>
    self.value_array[name].astype(float)
ValueError: could not convert string to float: '30/09/2007'

Environment

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@xzdandy xzdandy added Bug 🐞 EVA is not working as expected Crash 💥 EVA is crashing labels Sep 7, 2023
@xzdandy xzdandy added this to the v0.3.5 milestone Sep 7, 2023
@xzdandy
Copy link
Collaborator Author

xzdandy commented Sep 7, 2023

Hi @americast, is converting the date column into float expected for statsforecast framework? Thanks!

@xzdandy
Copy link
Collaborator Author

xzdandy commented Sep 8, 2023

We will revamp forecast support in #1081

@xzdandy xzdandy closed this as completed Sep 8, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug 🐞 EVA is not working as expected Crash 💥 EVA is crashing
Projects
None yet
Development

No branches or pull requests

1 participant