Skip to content

[Feedback] docs/components/pipelines/user-guides/core-functions/control-flow.md #4415

Description

@asteroth

From docs:

Kubeflow Pipelines supports loops which cause fan-out and fan-in of tasks.
but doesn't state if this is the ONLY type of loop.
The documentation page is missing example /explanation on how to use a basic loop (non parallel)
Apologies if this is something that should be obvious but I can't wrap my head around it

The following

@dsl.pipeline(name="loop-basic", description="Common training loop"
def do_train(epochs: int):
    # init model:
    tmodel = make_model() 
    # training loop - WILL FAIL:
    for epoch in range(epochs):
        t1 = task_train(tmodel.output)
        t2 = task_eval(t1.output)
        tmodel = t2

This fails because input to @dsl.pipeline is not an int, but an input channel - would be great to explain how the basic loop should be used under the flow control section or warn that this structure is incompatible with the pipeline and must be embedded into component

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions