" Object of type 'int64' is not JSON serializable" when running automl time series

Brian Norman 1 Reputation point
2020-09-08T13:26:46.537+00:00

I am trying to use the Online ML studio and running an "Automated ML". I upload my dataset (see simple example below) which passes fine and then I start a automl experiment selecting "time series forecasting". I select all the revelant fields and everything starts without any issues.

Shortly after the process fails and the error given is:

"User error: User program failed with TypeError: Object of type 'int64' is not JSON serializable"

Digging into the logs the only log with any useful information appears to be the driver_log which has these lines with no more detail about the error unless the INFO about streaming is actually an error not information:

2020-09-08 11:17:01.734 - INFO - Successfully retrieved data using dataprep.
2020-09-08 11:17:01.734 - INFO - Streaming is not conducive due to incompatible settings. Reason[s]: [Forecasting is not supported, 'n_cross_validations' was non-empty]
2020-09-08 11:17:01.734 - INFO - Service responded with streaming disabled
2020-09-08 11:17:01.734 - INFO - Inferring type for feature columns.
2020-09-08 11:17:12.669 - INFO - Error in setup_wrapper.
2020-09-08 11:17:12.670 - ERROR - Marking Run AutoML_f5a7c759-653c-4314-98a9-c2afbcecff55_setup as Failed.

Can anyone suggest an answer or recommend some ways to debug this?

![23236-image.png]1

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,852 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Brian Norman 1 Reputation point
    2020-09-08T13:41:33.393+00:00

    found the more detailed stacktrace

    "debugInfo": {
    "type": "TypeError",
    "message": "Object of type 'int64' is not JSON serializable",
    "stackTrace": " File \"/mnt/batch/tasks/shared/LS_root/jobs/brian-ml-learning/azureml/automl_f5a7c759-653c-4314-98a9-c2afbcecff55_setup/mounts/workspaceblobstore/azureml/AutoML_f5a7c759-653c-4314-98a9-c2afbcecff55_setup/azureml-setup/context_manager_injector.py\", line 166, in execute_with_context\n runpy.run_path(sys.argv[0], globals(), run_name=\"main\")\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/runpy.py\", line 263, in run_path\n pkg_name=pkg_name, script_name=fname)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"setup_AutoML_f5a7c759-653c-4314-98a9-c2afbcecff55.py\", line 731, in <module>\n result = setup_run()\n File \"setup_AutoML_f5a7c759-653c-4314-98a9-c2afbcecff55.py\", line 725, in setup_run\n prep_type=preparation_type\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/site-packages/azureml/train/automl/runtime/_remote_script.py\", line 578, in setup_wrapper\n setup_run._fail_with_error(e)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/site-packages/azureml/train/automl/run.py\", line 1258, in _fail_with_error\n logging_utilities.log_traceback(exception, logger)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/site-packages/azureml/automl/core/shared/logging_utilities.py\", line 212, in log_traceback\n error_msg_without_pii = _get_pii_free_message(exception)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/site-packages/azureml/automl/core/shared/logging_utilities.py\", line 140, in _get_pii_free_message\n return exception.get_pii_free_exception_msg_format()\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/site-packages/azureml/automl/core/shared/exceptions.py\", line 151, in get_pii_free_exception_msg_format\n error_dict = json.loads(self._serialize_json())\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/site-packages/azureml/_common/exceptions.py\", line 181, in _serialize_json\n return json.dumps(error_ret, indent=indent)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/json/init.py\", line 231, in dumps\n return _default_encoder.encode(obj)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/json/encoder.py\", line 199, in encode\n chunks = self.iterencode(o, _one_shot=True)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/json/encoder.py\", line 257, in iterencode\n return _iterencode(o, 0)\n File \"/azureml-envs/azureml_63ddfcee3da4413e556b059b99c2fb63/lib/python3.6/json/encoder.py\", line 180, in default\n o.class.name)\n",
    "innerException": null,
    "data": null,
    "errorResponse": null
    }


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.