Running Promptflow with empty default input parameter via pipeline fails #38892
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.
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 viaload_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:
@pipeline
.flow.dag.yaml
file containing empty input parameter.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:
A fragment from
flow.dag.yaml
with empty default input parameter:Example of jinja2 prompt with empty input parameter:
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.
The text was updated successfully, but these errors were encountered: