Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Promptflow with empty default input parameter via pipeline fails #38892

Open
Dzytizz opened this issue Dec 16, 2024 · 2 comments
Open
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@Dzytizz
Copy link

Dzytizz commented Dec 16, 2024

  • Package Name: azure.ai.ml
  • Package Version: 1.18.0
  • Operating System: Win11
  • Python Version: 3.12.7

Describe the bug
Promptflow by default supports running flows with empty default parameters (additional handling can be done using conditional checks in jinja2 prompts). Loading a flow.dag.yaml file via load_component() inside of a fuction with @pipeline() decorator yields "Can't build command text for [redacted], moduleId [redacted] executionId [redacted]: Assignment for parameter emptyByDefaultParameter is not specified" in Azure AI | Machine Learning Studio (see attached images). Such behavior is unexpected since running Promptflow flow directly runs without issues with empty input parameters and jinja2 prompts used in prompting becomes less useful since some conditional checks will not be reached.

To Reproduce
Steps to reproduce the behavior:

  1. Create a chat Promptflow with empty input parameter.
  2. Create a job from a function decorated with @pipeline.
  3. The method should contain a flow component which is loaded from flow.dag.yaml file containing empty input parameter.
  4. Run the created job, notice error message in Azure AI | Machine Learning Studio.
    To create a pipeline job, load a flow as a component and create a job using the pipeline a tutorial was followed: https://microsoft.github.io/promptflow/tutorials/pipeline.html

Expected behavior
It is expected that if no parameter is provided (or a parameter is passed as '') to the default empty input parameter the flow should run successfully by using an empty value which can be handled by jinja2 prompts.

Screenshots
The code used to create a flow component:
Image
A fragment from flow.dag.yaml with empty default input parameter:
Image
Example of jinja2 prompt with empty input parameter:
Image

Additional context
Currently I have tried not passing the default parameter, passing '' and None without any progress. A workaround can be done using a hardcoded default value and checking for in jinja2 prompt but it is against clean code practices.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 16, 2024
@l0lawrence
Copy link
Member

Hi @Dzytizz thanks for the feedback, we will get back to you asap. Directing this to @azureml-github.

@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 16, 2024
@l0lawrence l0lawrence added the Service Attention Workflow: This issue is responsible by Azure service team. label Dec 16, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Dec 16, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants