How to access parameters passed from ADF within Azure ML Execute Python Script Module

Adhisivan Ragunathan 0 Reputation points
2025-02-09T14:20:20.38+00:00

I am passing few parameters from ADF pipeline to Execute ML Pipeline Activity. I couldn't find a way to access those parameters inside Azure ML - Execute Python Script Module. I came across post in 2021 stating "this was not supported", since then was there any change to this feature? Is there a way to read parameters within Execute Python Script Module?

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,111 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,215 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 27,386 Reputation points MVP
    2025-02-10T01:14:08.2266667+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    As of now, directly passing parameters from an adf pipeline to an Azure ML execute python script module remains unsupported. This limitation has been acknowledged in discussions dating back to 2021, and there have been no official updates indicating a change in this capability.

    alternative approaches to try:

    1. Utilize Azure Batch with ADF:
      • You can configure ADF to run Python scripts via Azure Batch, allowing parameter passing. In this setup, parameters can be passed as command-line arguments to the Python script.
    2. Leverage Azure Databricks:
      • ADF can execute notebooks or Python scripts in Azure Databricks, where parameters are passed seamlessly. This method offers flexibility and integration capabilities.
    3. Custom Modules in AML Designer:
      • AML Designer supports creating custom modules, which can be designed to accept parameters. This approach requires additional setup but provides a tailored solution within the AML environment.

    While these alternatives may require adjustments to your current workflow, they offer viable solutions to achieve the desired parameter passing functionality between adf and your python scripts.

    Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.