不支持“未知”类型的输入支持的类型:[azureml.data.tabular_dataset.TabularDataset, azureml.pipeline.core

问题描述

根据本文档: https://docs.microsoft.com/en-us/python/api/azureml-train-automl-client/azureml.train.automl.automlconfig.automlconfig?view=azure-ml-py

training_data 可以是数据框或数据集。

但是,当我使用数据框时,出现此错误:


ConfigException: ConfigException:
    Message: Input of type 'Unknown' is not supported. Supported types: [azureml.data.tabular_dataset.TabularDataset,azureml.pipeline.core.pipeline_output_dataset.PipelineOutputTabularDataset]
    InnerException: None
    ErrorResponse 
{
    "error": {
        "code": "UserError","message": "Input of type 'Unknown' is not supported. Supported types: [azureml.data.tabular_dataset.TabularDataset,azureml.pipeline.core.pipeline_output_dataset.PipelineOutputTabularDataset]","details_uri": "https://aka.ms/AutoMLConfig","target": "training_data","inner_error": {
            "code": "BadArgument","inner_error": {
                "code": "ArgumentInvalid","inner_error": {
                    "code": "InvalidInputDatatype"
                }
            }
        }
    }
}

我的代码非常简单:


client = CosmosClient(HOST,MASTER_KEY)
database = client.get_database_client(database=DATABASE_ID)
container = database.get_container_client(CONTAINER_ID)

item_list = list(container.read_all_items(max_item_count=10))
df = pd.DataFrame(item_list)

from azureml.core.workspace import Workspace
ws = Workspace.from_config()

from azureml.automl.core.forecasting_parameters import ForecastingParameters

forecasting_parameters = ForecastingParameters(time_column_name='EventEnqueuedUtcTime',forecast_horizon=50,time_series_id_column_names=["eui"],freq='H',target_lags='auto',target_rolling_window_size=10)

from azureml.core.workspace import Workspace
from azureml.core.experiment import Experiment
from azureml.train.automl import AutoMLConfig
from azureml.core.compute import ComputeTarget,AmlCompute
import logging

amlcompute_cluster_name = "computecluster"
compute_target = ComputeTarget(workspace=ws,name=amlcompute_cluster_name)
experiment_name = 'iot-forecast'

experiment = Experiment(ws,experiment_name)

automl_config = AutoMLConfig(task='forecasting',primary_metric='normalized_root_mean_squared_error',experiment_timeout_minutes=100,enable_early_stopping=True,training_data=df,compute_target = compute_target,label_column_name='TempC_DS',n_cross_validations=5,enable_ensembling=False,verbosity=logging.INFO,forecasting_parameters=forecasting_parameters)

remote_run = experiment.submit(automl_config,show_output=True)

我在这里遗漏了什么?

解决方法

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

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

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