Skip to content

Better frequency inference and message for timeseries forecasting  #1279

Open
@xzdandy

Description

@xzdandy

Search before asking

  • I have searched the EvaDB issues and found no similar feature requests.

Description

  1. Better error message when frequency can not be inferred. Instead of the following long error message:
10-12-2023 06:21:49 ERROR [plan_executor:plan_executor.py:execute_plan:0179] Can not infer the frequency for HomeSaleForecast. Please explicitly set it.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/plan_executor.py", line 175, in execute_plan
    yield from output
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/create_function_executor.py", line 526, in exec
    ) = self.handle_forecasting_function()
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/create_function_executor.py", line 254, in handle_forecasting_function
    raise RuntimeError(
RuntimeError: Can not infer the frequency for HomeSaleForecast. Please explicitly set it.
ERROR:evadb.utils.logging_manager:Can not infer the frequency for HomeSaleForecast. Please explicitly set it.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/plan_executor.py", line 175, in execute_plan
    yield from output
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/create_function_executor.py", line 526, in exec
    ) = self.handle_forecasting_function()
  File "/usr/local/lib/python3.10/dist-packages/evadb/executor/create_function_executor.py", line 254, in handle_forecasting_function
    raise RuntimeError(
RuntimeError: Can not infer the frequency for HomeSaleForecast. Please explicitly set it.
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/evadb/executor/plan_executor.py in execute_plan(self, do_not_raise_exceptions, do_not_print_exceptions)
    174             if output is not None:
--> 175                 yield from output
    176         except Exception as e:

6 frames
RuntimeError: Can not infer the frequency for HomeSaleForecast. Please explicitly set it.

During handling of the above exception, another exception occurred:

ExecutorError                             Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/evadb/executor/plan_executor.py in execute_plan(self, do_not_raise_exceptions, do_not_print_exceptions)
    178                 if do_not_print_exceptions is False:
    179                     logger.exception(str(e))
--> 180                 raise ExecutorError(e)

ExecutorError: Can not infer the frequency for HomeSaleForecast. Please explicitly set it.

we shall return a simple response with Can not infer the frequency for HomeSaleForecast. Please explicitly set it.

  1. Frequency has a non-negligible affect on the forecasting result. For example in the Colab, when frequency is 'W', we have a flat prediction and frequency is 'M', we no longer have flat prediction. Given the auto frequency infer is not working, how should user choose the frequency?

Use case

Check Colab Notebook for the data and reproducing the error.

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI EnginesFeatures, Bugs, related to AI Engines

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions