簡體   English   中英

如何為管道作業期間上傳的 Azure 機器學習格式化 MLTable 中的文件路徑?

[英]How to format the file path in an MLTable for Azure Machine Learning uploaded during a pipeline job?

如何在本地文件夾中創建但隨后作為管道作業的一部分上傳的 MLTable 文件中表達 (.csv) 文件的路徑?

我正在關注azuerml-examples 存儲庫( 文章筆記本)中的 Jupyter notebook automl-forecasting-task-energy-demand-advance 此示例有一個 MLTable 文件,如下所示,引用具有相對路徑的 .csv 文件。 然后在管道中上傳 MLTable 以供遠程計算訪問(為簡潔起見,省略了一些內容)

my_training_data_input = Input(
    type=AssetTypes.MLTABLE, path="./data/training-mltable-folder"
)

compute = AmlCompute(
        name=compute_name, size="STANDARD_D2_V2", min_instances=0, max_instances=4
    )

forecasting_job = automl.forecasting(
    compute=compute_name, # name of the compute target we created above
    # name="dpv2-forecasting-job-02",
    experiment_name=exp_name,
    training_data=my_training_data_input,
    # validation_data = my_validation_data_input,
    target_column_name="demand",
    primary_metric="NormalizedRootMeanSquaredError",
    n_cross_validations="auto",
    enable_model_explainability=True,
    tags={"my_custom_tag": "My custom value"},
)

returned_job = ml_client.jobs.create_or_update(
    forecasting_job
)

ml_client.jobs.stream(returned_job.name)

但是運行它會出現錯誤

錯誤消息:從數據集中獲取數據時遇到用戶錯誤。 錯誤:UserErrorException:消息:MLTable yaml 架構無效:錯誤代碼:驗證驗證錯誤代碼:無效的 MLTable 驗證目標:MLTableToDataflow 錯誤消息:無法將 MLTable 轉換為數據流 uri 路徑不是有效的數據存儲 uri 路徑 | session_id=857bd9a1-097b-4df6-aa1c-8871f89580d8 InnerException None ErrorResponse { “錯誤”:{ “代碼”:“UserError”,“消息”:“MLTable yaml 架構無效:\n錯誤代碼:驗證\n驗證錯誤代碼:無效MLTable\n驗證目標:MLTableToDataflow\n錯誤消息:無法將 MLTable 轉換為數據流\nuri 路徑不是有效的數據存儲 uri 路徑\n| session_id=857bd9a1-097b-4df6-aa1c-8871f89580d8" } }

paths:
  - file: ./nyc_energy_training_clean.csv
transformations:
  - read_delimited:
        delimiter: ','
        encoding: 'ascii'
  - convert_column_types:
      - columns: demand
        column_type: float
      - columns: precip
        column_type: float
      - columns: temp
        column_type: float

我應該如何運行它? 提前致謝!

對於 Remote PATH,您可以使用下面的內容,這里是創建數據資產的文檔

請務必注意,MLTable 文件中指定的路徑必須是雲中的有效路徑,而不僅僅是本地計算機上的有效路徑。

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM