Add support for recursive list, dict, and tuple ref parsing for pipeline controller.add step() parameter override #1099
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue \ discussion
#1089
Patch Description
Adds support when using
PipelineController.add_step()
. Currently, it's impossible to parse anything besides strings with_parse_step_ref()
inparameter_override
. This patch allows list, dics, and tuples to be recursively parsed for step reference substitution. Since recursive features can add computational complexity the new feature is hidden behind a flag that can be passed when adding a step, which makes this a non-breaking change.Testing Instructions
If
recursively_parse_parameters=True
inPipelineController.add_step()
, recursively parse parameters from parameter_override in lists, dicts, or tuples.Examples:
-
parameter_override={'Args/input_file': ['${<step_name>.artifacts.<artifact_name>.url}', 'file2.txt']}
will be correctly parsed.-
parameter_override={'Args/input_file': ('${<step_name_1>.parameters.Args/input_file}', '${<step_name_2>.parameters.Args/input_file}')}
will be correctly parsed.