1

我在 AzureML Designer 上构建了一个管道,我正在尝试使用管道参数,但我无法在 python 脚本模块上获取这些参数的值。

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-create-your-first-pipeline 本文档包含一个名为“使用管道参数处理在推理时更改的参数”的部分,但是,不幸的是,它是空的。

我正在定义管道设置的参数,请参阅底部的屏幕截图。有谁知道在使用 Designer 构建管道时如何使用参数?

管道参数定义

4

1 回答 1

0

您可以将每个管道阶段的输出与其输入相关联。例如,给定模型评估的结果,我们应该能够轻松识别与所述评估有关的所有工件(模型评估配置、模型规范、模型参数、训练脚本、训练数据等)。

Azure 机器学习管道参考文章: https ://github.com/Azure/MachineLearningNotebooks/blob/4a3f8e7025334ea8c0de0bada69b031ce54c24a0/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-use-databricks -as-compute-target.ipynb

我们有一个 AMLS 管道,它试图使用日期字符串进行参数化,以在旧历史日期的上下文中处理我们的管道。

这是我们用来提交管道的代码

from azureml.core.authentication import InteractiveLoginAuthentication
import requests
 
auth = InteractiveLoginAuthentication()
aad_token = auth.get_authentication_header()
 
rest_endpoint = published_pipeline.endpoint
 
print("You can perform HTTP POST on URL {} to trigger this pipeline".format(rest_endpoint))
 
# specify the param when running the pipeline
response = requests.post(rest_endpoint, 
                         headers=aad_token, 
                         json={"ExperimentName": "dtpred-Dock2RTEG-EX-param",
                               "RunSource": "SDK",
                               "DataPathAssignments": {"input_datapath": {"DataStoreName": "erpgen2datastore","RelativePath": "teams/PredictiveInsights/DatePrediction/2019/10/10"}},
                               "ParameterAssignments": {"param_inputDate": "2019/10/10"}})
run_id = response.json()["Id"]
print('Submitted pipeline run: ', run_id)
于 2020-12-16T16:05:17.770 回答