我已经在 AzureML Designer 上构建了一个管道,并且正在尝试使用管道参数,但我无法在 python 脚本模块上获取这些参数的值。
https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-your-first-pipeline 本文档包含一个名为“对推理时更改的参数使用管道参数”的部分,但不幸的是,它是空的。
我正在定义管道设置的参数,请参阅底部的屏幕截图。有谁知道使用Designer构建管道时如何使用参数吗?
最佳答案
您可以将每个管道阶段的输出与其输入相关联。例如给定模型评估的结果,我们应该能够轻松识别与所述评估相关的所有工件(模型评估配置、模型规范、模型参数、训练脚本、训练数据等)。
Azure Machine Learning Pipelines引用文章: 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 管道尝试使用日期字符串进行参数化,以在旧历史日期的上下文中处理我们的管道。
这是我们用来提交 pipeline 的代码
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)
关于azure - 如何在 AzureML 上使用管道参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65231534/