1

I've built a pipeline on AzureML Designer and I'm trying to use pipeline parameters but I'm not able to get the values of those parameters on a python script module.

https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-your-first-pipeline This documentation contains a section called "Use pipeline parameters for arguments that change at inference time" but, unfortunately, it is empty.

I'm defining the parameters on the pipeline setting, see the screenshot on the bottom. Does anyone know how to use the parameters when using the Designer to build the pipeline?

pipeline parameters definition

gigatt
  • 105
  • 7
Pere Rumbo
  • 95
  • 1
  • 8

1 Answers1

0

You can correlate each pipeline stage’s outputs w/its inputs. e.g. given the results of model evaluation we should be able to easily identify all the artifacts (model evaluation configuration, model specification, model parameters, training script, training data etc.) pertaining to said evaluation.

Azure Machine Learning Pipelines Referenced Article: 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

We have an AMLS pipeline trying to parameterize with a date string to process our pipeline in the context of old historical dates.

Here’s the code we’re using to submit the 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)
Ram
  • 2,459
  • 1
  • 7
  • 14
  • Thanks for the answer Ram-msft. I do know how to send the parameters on the request, however, what I don't know is how to use them at running time (for instance in a python script contained in the pipeline). – Pere Rumbo Dec 17 '20 at 13:19
  • Thanks, Please share the python script that you are trying. – Ram Dec 18 '20 at 05:29