不支持类型为’Unknown’的输入。支持的类型有:[azureml.data.tabular_dataset.TabularDataset, azureml.pipeline.core

根据此文档:https://learn.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 Workspacews = Workspace.from_config()from azureml.automl.core.forecasting_parameters import ForecastingParametersforecasting_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 Workspacefrom azureml.core.experiment import Experimentfrom azureml.train.automl import AutoMLConfigfrom azureml.core.compute import ComputeTarget, AmlComputeimport loggingamlcompute_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)

我这里遗漏了什么?


回答:

看起来你在尝试远程运行实验,据我所知,根据此文档

enter image description here

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

Related Posts

使用LSTM在Python中预测未来值

这段代码可以预测指定股票的当前日期之前的值,但不能预测…

如何在gensim的word2vec模型中查找双词组的相似性

我有一个word2vec模型,假设我使用的是googl…

dask_xgboost.predict 可以工作但无法显示 – 数据必须是一维的

我试图使用 XGBoost 创建模型。 看起来我成功地…

ML Tuning – Cross Validation in Spark

我在https://spark.apache.org/…

如何在React JS中使用fetch从REST API获取预测

我正在开发一个应用程序,其中Flask REST AP…

如何分析ML.NET中多类分类预测得分数组?

我在ML.NET中创建了一个多类分类项目。该项目可以对…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注