AutoMl Forecasting - Query via REST (Issue with input date field)

prem_raj
New Contributor II

Hi ,

Used automl forecasting model with sample data and the model is trained successfully. But when i was to serve the model over REST endpoint, i'm getting the error while querying via the inbuilt browser and postman. (Error seems to be with the date field type- throws python code error)

Sample data trained:

 DATE IPG3113N TYPE

01/01/72 74.6385 RadioActive

Input Json Request:

{

 "dataframe_split": {

  "columns": [

   "DATE",

   "TYPE"

  ],

  "data": [

   [

    "1973-12-02",

    "RadioActive"

   ]

  ]

 }

}

Error Received:

{"error_code": "BAD_REQUEST", "message": "Encountered an unexpected error while evaluating the model. Verify that the input is compatible with the model for inference. Error 'Cannot use .astype to convert from timezone-aware dtype to timezone-naive dtype. Use obj.tz_localize(None) or obj.tz_convert('UTC').tz_localize(None) instead.'", "stack_trace": "Traceback (most recent call last):\n File \"/opt/conda/envs/mlflow-env/lib/python3.9/site-packages/pandas/core/groupby/groupby.py\", line 1353, i

What I have tried:

  1. Changed the date input field with different values like 1973-12-02T00:00:00.000+0000, 1973-12-02 00:00:00
  2. Used different databricks version like 11.3LTS and 12.2 LTS.

I know that my date input is wrong with notebook generated, but not able to figure out the expect input value.

Can someone help here?