Skip to content

Commit

Permalink
fix(samples): fixes name error and unused parameter in samples for lo…
Browse files Browse the repository at this point in the history
…op_parallelism (#4187)

* Added parallism at sub-dag level

* updated the parallism

* remove yaml file

* reformatting

* Update sdk/python/kfp/compiler/compiler.py

* Update sdk/python/kfp/compiler/compiler.py

* Update samples/core/loop_parallelism/loop_parallelism.py

Co-authored-by: Alexey Volkov <alexey.volkov@ark-kun.com>

* fixed example

Co-authored-by: Alexey Volkov <alexey.volkov@ark-kun.com>
  • Loading branch information
Niklas Hansson and Ark-kun authored Aug 10, 2020
1 parent 01a7998 commit 57bb7ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/core/loop_parallelism/loop_parallelism.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def print_op(s: str):
print(s)

@dsl.pipeline(name='my-pipeline')
def pipeline2(my_pipe_param=10):
def pipeline():
loop_args = [{'A_a': 1, 'B_b': 2}, {'A_a': 10, 'B_b': 20}]
with dsl.ParallelFor(loop_args, parallelism=1) as item:
with dsl.ParallelFor(loop_args, parallelism=10) as item:
print_op(item)
print_op(item.A_a)
print_op(item.B_b)
Expand Down

0 comments on commit 57bb7ac

Please sign in to comment.