Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Pipeline parameters used with DataPath and DataPathComputeBinding to specify side inputs of Parallel pipeline

未关闭
#1,801 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
azure, python

调研方向

从 PipelineParameter API 页面和链接的 AzureML-Docset 源文件开始,然后使用 azureml-core==1.40.0.post2 和 azureml-pipeline==1.40.0 重现该示例。将文档中 DataPath/DataPathComputeBinding 的用法与报告的 ParallelRunStep 错误进行比较;当文档或受支持版本指南准确反映该行为时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

[Enter feedback here]
I'm following this example to create a PipelineParameters for my Parallel pipeline

from azureml.core.datastore import Datastore
from azureml.data.datapath import DataPath, DataPathComputeBinding
from azureml.pipeline.steps import PythonScriptStep
from azureml.pipeline.core import PipelineParameter

datastore = Datastore(workspace=workspace, name="workspaceblobstore")
datapath = DataPath(datastore=datastore, path_on_datastore='input_data')
data_path_pipeline_param = (PipelineParameter(name="input_data", default_value=datapath),
                           DataPathComputeBinding(mode='mount'))

train_step = PythonScriptStep(script_name="train.py",
                             arguments=["--input", data_path_pipeline_param],
                             inputs=[data_path_pipeline_param],
                             compute_target=compute_target,
                             source_directory=project_folder)

This is my code to create the pipeline with the parameters

path = DataPath(datastore=default_store, path_on_datastore='path')
input_param= (PipelineParameter(name="param_name", default_value=path), DataPathComputeBinding(mode='mount'))

parallel_run_config = ParallelRunConfig(
    source_directory=script_dir,
    entry_script='script.py',  # the user script to run against each input
    partition_keys=['key'],
    error_threshold=50,
    output_action='append_row',
    environment=environment,
    compute_target=compute_target, 
    node_count=2,
    run_invocation_timeout=1200
)

parallel_run_step = ParallelRunStep(
    name='test-batch-inference',
    inputs=[partition_input],
    side_inputs=[input1, input2, input_param],
    output=output_dir,
    parallel_run_config=parallel_run_config,
    arguments=['--input_param', input_param],
    allow_reuse=False
)

And it raised this error:

Exception: Step input must be of any type: (<class 'azureml.data.dataset_consumption_config.DatasetConsumptionConfig'>, <class 'azureml.pipeline.core.pipeline_output_dataset.PipelineOutputFileDataset'>, <class 'azureml.pipeline.core.pipeline_output_dataset.PipelineOutputTabularDataset'>, <class 'azureml.data.output_dataset_config.OutputFileDatasetConfig'>, <class 'azureml.data.output_dataset_config.OutputTabularDatasetConfig'>, <class 'azureml.data.output_dataset_config.LinkFileOutputDatasetConfig'>, <class 'azureml.data.output_dataset_config.LinkTabularOutputDatasetConfig'>), found <class 'tuple'>

I'm using azureml-core==1.40.0.post2, azureml-pipeline==1.40.0
It's seems like the sample code is not supported with these version? Before trying this datapath as pipeline parameter, I tried int type input and its just work fine


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

主要语言
Jupyter Notebook
星标
4.4k
派生
2.6k
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Azure/MachineLearningNotebooks 的其他 Issue

查看 Azure/MachineLearningNotebooks 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。