Skip to content

Commit

Permalink
fix(sdk): sanitize op name. Fix #6433 (#6600)
Browse files Browse the repository at this point in the history
* fix(sdk): sanitize op name. Fix #6433

* Add release note: Fix the error that kfp v1 compiler failed to provide unique name for ops of the same component.
  • Loading branch information
lynnmatrix authored Sep 28, 2021
1 parent b6ca63f commit 4e89973
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdk/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Support re-use of PVC with VolumeOp. [\#6582](https://github.com/kubeflow/pipelines/pull/6582)
* When namespace file is missing, remove stack trace so it doesn't look like an error [\#6590](https://github.com/kubeflow/pipelines/pull/6590)
* Local runner supports additional docker options. [\#6599](https://github.com/kubeflow/pipelines/pull/6599)

* Fix the error that kfp v1 compiler failed to provide unique name for ops of the same component. [\#6600](https://github.com/kubeflow/pipelines/pull/6600)

## Documentation Updates

Expand Down
4 changes: 2 additions & 2 deletions sdk/python/kfp/dsl/_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ def add_op(self, op: _container_op.BaseOp, define_only: bool):
'_', '-')
#If there is an existing op with this name then generate a new name.
op_name = _naming._make_name_unique_by_adding_index(
op_name, list(self.ops.keys()), ' ')
op_name, list(self.ops.keys()), '-')
if op_name == '':
op_name = _naming._make_name_unique_by_adding_index(
'task', list(self.ops.keys()), ' ')
'task', list(self.ops.keys()), '-')

self.ops[op_name] = op
if not define_only:
Expand Down

0 comments on commit 4e89973

Please sign in to comment.