数据输入期间的 Azure ML 时间序列模型推断错误 (python)

问题描述

在 Azure ML Studio 中,我使用 AutoML 准备了一个用于时间序列预测的模型。数据在所有数据集中都有一些罕见的差距。 我正在使用以下代码调用已部署的 Azure AutoML 模型作为 Web 服务:

import requests
import json
import pandas as pd

# URL for the web service
scoring_uri = 'http://xxxxxx-xxxxxx-xxxxx-xxxx.xxxxx.azurecontainer.io/score'
    
# Two sets of data to score,so we get two results back
new_data = pd.DataFrame([
            ['2020-10-04 19:30:00',1.29281,1.29334,1],['2020-10-04 19:45:00',1.29294,['2020-10-04 21:00:00',1.29217,1.29163,34],['2020-10-04 21:15:00',1.29257,1.29301,1.29115,195]],columns=['1','2','3','4','5','6']        
)
# Convert to JSON string
input_data = json.dumps({'data': new_data.to_dict(orient='records')})

# Set the content type
headers = {'Content-Type': 'application/json'}
    
# Make the request and display the response
resp = requests.post(scoring_uri,input_data,headers=headers)
print(resp.text)

我收到一个错误:

{\"error\": \"DataException:\\n\\tMessage: No y values were provided. We expected non-null target values as prediction context because there is a gap between train and test and the forecaster depends on previous values of target. If it is expected,please run forecast() with ignore_data_errors=True. In this case the values in the gap will be imputed.\\n\\tInnerException: None\\n\\tErrorResponse \\n{\\n

我尝试将“ignore_data_errors=True”添加到代码的不同部分,但没有成功,因此,出现另一个错误:

TypeError: __init__() got an unexpected keyword argument 'ignore_data_errors'

我非常感谢任何帮助,因为我被困在这里。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)