You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
m-dz
changed the title
[bug] <Bug Name>
[bug] For loops in nested pipelines have clashing names
Dec 23, 2024
m-dz
changed the title
[bug] For loops in nested pipelines have clashing names
[bug] For loops in nested pipelines have clashing component names
Dec 23, 2024
To add more details, I'll link to the code below, but in short, at some point pipelines are being "merged" into one, big YAML (I think) file where each task and component from each of the sub-pipelines sits. So e.g. if we have the "main", then "pipeline_sub", at some point the two are merged together into this single file where every component "should" have an unique name etc.
It all sits in kfp/compiler/pipeline_spec_builder.py:
The latter builds the component renaming dict old_name_to_new_name, and only then renames the components, so we are potentially renaming different components to the same name, as illustrated above.
There is also _merge_deployment_spec, but that seems to be fine.
I just found a stale PR #11071 (I searched in issues, not PRs...) addressing this exact issue, but there seems to be a simpler solution by not enforcing the ParallelFor renaming to for-loop-X. The approach to enforce this seems strange, why not trust users to correctly (in a unique way) name their loops?
Environment
Python 3.10.13
KFP SDK version:
2.11.0 (current on 23/12/2014)
Steps to reproduce
Simple example with:
What I think is happening when pipelines are being merged:
Expected result
Expected behaviour can be obtained by making two relatively simple changes in the
TasksGroup
class:self.name = name
in https://github.com/kubeflow/pipelines/blob/master/sdk/python/kfp/dsl/tasks_group.py#L69 , which provides a name for the component to use_make_name_unique
method (https://github.com/kubeflow/pipelines/blob/master/sdk/python/kfp/dsl/tasks_group.py#L87) from it, which stops the name to be overwrittenMaterials and reference
The following 2 files reproduce the issue:
Labels
/area components
Impacted by this bug? Give it a 👍.
The text was updated successfully, but these errors were encountered: