Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lina Tang committed Apr 23, 2024
1 parent dcfbcb4 commit cabb162
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/promptflow-core/promptflow/executor/flow_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def _exec(
try:
if validate_inputs:
inputs = FlowValidator.ensure_flow_inputs_type(
flow=self._flow.inputs, inputs=inputs, idx=run_info.index
flow_inputs=self._flow.inputs, inputs=inputs, idx=run_info.index
)
inputs = self._multimedia_processor.load_multimedia_data(self._flow.inputs, inputs)
# Inputs are assigned after validation and multimedia data loading, instead of at the start of the flow run.
Expand Down Expand Up @@ -1043,7 +1043,9 @@ async def _exec_async(
aggregation_inputs = {}
try:
if validate_inputs:
inputs = FlowValidator.ensure_flow_inputs_type(flow=self._flow.inputs, inputs=inputs, idx=line_number)
inputs = FlowValidator.ensure_flow_inputs_type(
flow_inputs=self._flow.inputs, inputs=inputs, idx=line_number
)
# TODO: Consider async implementation for load_multimedia_data
inputs = self._multimedia_processor.load_multimedia_data(self._flow.inputs, inputs)
# Make sure the run_info with converted inputs results rather than original inputs
Expand Down
2 changes: 1 addition & 1 deletion src/promptflow-devkit/promptflow/batch/_batch_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def _get_aggregation_inputs(self, batch_inputs, line_results: List[LineResult]):

succeeded_batch_inputs = [batch_inputs[i] for i in succeeded]
resolved_succeeded_batch_inputs = [
FlowValidator.ensure_flow_inputs_type(flow=self._flow.inputs, inputs=input)
FlowValidator.ensure_flow_inputs_type(flow_inputs=self._flow.inputs, inputs=input)
for input in succeeded_batch_inputs
]
succeeded_inputs = transpose(resolved_succeeded_batch_inputs, keys=list(self._flow.inputs.keys()))
Expand Down

0 comments on commit cabb162

Please sign in to comment.