Azure / Azure/MachineLearningNotebooks
Pipeline parameters used with DataPath and DataPathComputeBinding to specify side inputs of Parallel pipeline
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 4.4k
- Fork
- 2.6k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
[Enter feedback here]
I'm following [this](https://docs.microsoft.com/en-us/python/api/azureml-pipeline-core/azureml.pipeline.core.graph.pipelineparameter?view=azure-ml-py) 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: (, , , , , , ), found
```
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.*
* ID: 8e3ec7f7-25c2-8f63-331c-2eb62ffb73c7
* Version Independent ID: 4e31dffb-12fd-85d9-a1a2-aa038017d075
* Content: [azureml.pipeline.core.graph.PipelineParameter class - Azure Machine Learning Python](https://docs.microsoft.com/en-us/python/api/azureml-pipeline-core/azureml.pipeline.core.graph.pipelineparameter?view=azure-ml-py)
* Content Source: [AzureML-Docset/stable/docs-ref-autogen/azureml-pipeline-core/azureml.pipeline.core.graph.PipelineParameter.yml](https://github.com/MicrosoftDocs/MachineLearning-Python-pr/blob/live/AzureML-Docset/stable/docs-ref-autogen/azureml-pipeline-core/azureml.pipeline.core.graph.PipelineParameter.yml)
* Service: **machine-learning**
* Sub-service: **core**
* GitHub Login: @DebFro
* Microsoft Alias: **debfro**
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu với trang API PipelineParameter và tệp nguồn AzureML-Docset được liên kết, sau đó tái hiện ví dụ bằng azureml-core==1.40.0.post2 và azureml-pipeline==1.40.0. So sánh cách sử dụng DataPath/DataPathComputeBinding được ghi trong tài liệu với lỗi ParallelRunStep được báo cáo; công việc được xem là hoàn tất khi tài liệu hoặc hướng dẫn về phiên bản được hỗ trợ phản ánh chính xác hành vi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- azure, python
- Lĩnh vực
- documentation, machine-learning
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100