【问题标题】:Input of type 'Unknown' is not supported. Supported types: [azureml.data.tabular_dataset.TabularDataset, azureml.pipeline.core不支持“未知”类型的输入。支持的类型:[azureml.data.tabular_dataset.TabularDataset, azureml.pipeline.core
【发布时间】:2021-05-26 15:31:03
【问题描述】:

根据本文档: 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)

我在这里错过了什么?

【问题讨论】:

    标签: python python-3.x pandas machine-learning azure-machine-learning-studio


    【解决方案1】:

    看起来您正在尝试远程运行实验,AFAIK 并按照文档 here :

    你可以参考这篇文章来了解创建Azure ML TabularDataset

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-01
      • 2022-01-15
      • 2016-04-26
      • 2020-07-21
      • 2018-09-24
      • 2020-09-29
      • 2020-06-24
      • 2023-03-30
      相关资源
      最近更新 更多