Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4.07k stars 2.52k forks source link

Using compute target name as a PipelineParameter #1934

Open roshan-chistats opened 1 year ago

roshan-chistats commented 1 year ago

I have a query regarding the behavior of the azureml.pipeline.core.graph.PipelineParameter class. As its name suggests, the PipelineParameter is employed to dynamically pass values to our pipeline after its publication. My objective is to convey dynamic values to the orchestrating notebook. For instance, I intend to provide the compute target name dynamically once the pipeline is published. What I am implying is that users can specify the compute name afterwards, eliminating the need for hardcoding the same.

The code i tried:

ws = Workspace.from_config()
compute_para = PipelineParameter(name="compute_parameter", default_value="vm1-ig-04-aml-in-cappa-d")
compute_target = ComputeTarget(workspace=ws, name=compute_para.default_value)

As I have assigned the default value of the compute name to the compute target, it is currently utilizing only the default value. My inquiry pertains to the existence of any available functionality within Azure that allows for the dynamic transmission of values to the orchestrating notebook.

Let me know if you need more info.