Skip to content

Commit

Permalink
Merge pull request #783 from deepmodeling/zjgemi
Browse files Browse the repository at this point in the history
fix: multi-merge case when key is not used
  • Loading branch information
zjgemi authored Mar 28, 2024
2 parents 54bb7b6 + 74e1bd8 commit c216cc6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/dflow/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,19 @@ def merge_step_output_artifact(art, parent):
step.inputs.parameters["dflow_artifact_key"] = \
InputParameter(value="{{inputs.parameters."
"dflow_artifact_key}}")
if step.prepare_step is not None and art.name in \
step.prepare_step.outputs.artifacts:
# for multi-merge, save output artifact of inner
# slices all together
step.prepare_step.template.inputs.parameters[
"dflow_artifact_key"] = InputParameter()
step.prepare_step.inputs.parameters[
"dflow_artifact_key"] = InputParameter(
value="{{inputs.parameters."
"dflow_artifact_key}}")
merge_output_artifact(
step.prepare_step.template.outputs.artifacts[
art.name], None)
merge_output_artifact(
template.outputs.artifacts[art.name], template)

Expand Down

0 comments on commit c216cc6

Please sign in to comment.