I just confirmed with our engineer that you cannot set up a pipeline parameter and use it without tying it with any of the module parameter. So the workaround is - make the pipeline parameter as one of the inputs (i.e. dataset) to "Execute Python Script" module and set it as pipeline parameter. Then you can change it every time when calling the pipeline.
How do I access an input parameter in Azure Machine Learning endpoints?
I've created an Azure ML Endpoint Pipeline with a single 'Execute Python Script'. From the script, I am looking for a way to access the input 'ParameterAssignments' that I POST to the endpoint to trigger the pipeline. I expected to see them somewhere in Run.get_context(), but I haven't had any luck. I simply need a way to POST arbitrary values that my Python scripts can access. Thank you!
Thank you for replying. I've attached screenshots to illustrate what I'm trying to do. Basically, once I deploy the Pipeline endpoint, I want to access the pipeline parameter circled in red from within my python script. I feel like I've tried everything. I've read all the documentation there is and have spent 20+ hours trying to find a way to accomplish this. Any guidance or ideas you can provide would be well-received.
Sign in to comment
With Lu Zhang's help, I was able to successfully achieve what I needed to do. The relevant documentation to import data from a regular pipeline endpoint to an 'Execute Python Script' can be found here: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-retrain-designer
Basically, an 'Import Data' node can be attached as a parameter to the Execute Python Script. From there, you can define various parameters of the Import Data node as pipeline parameters. Pipeline parameters can be submitted to the pipeline endpoint invocation with a JSON serialized http request body with a 'ParameterAssignments' object which contains the parameters you wish to override.
Sign in to comment