azure - 如何在 AzureML 上使用管道参数

标签 azure azure-machine-learning-service azureml-python-sdk

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

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

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

pipeline parameters definition

最佳答案

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

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/

相关文章:

azure - 如何将参数值与Azure yaml管道中的字符串进行比较

azure - 如何使用 Azure InferenceSchema 包为具有嵌套结构的字典生成推理架构?

Azure 机器学习中的 R 错误,而不是 R Studio 中的错误

c# - 将日期时间刻度(String.Format ("{0:D19}",DateTime.MaxValue.Ticks - DateTime.UtcNow.Ticks)转换为日期时间

azure - Apache Ignite 2.9.0 从丢失的分区中恢复

azure - 如何将应用程序见解配置从azure移植到配置文件

machine-learning - Azure 机器学习甚至采样

python - AzureML : Dataset Profile fails when parquet file is empty

python - 如何删除 azureml 数据集(如果已存在)

python-3.x - 访问 Azure Auto ML 的 Azure 数据存储时出现 SSL 错误