<#3215 [BUG] flyte workflow execution nodes for dy...
# flyte-github
a
#3215 [BUG] flyte workflow execution nodes for dynamic tasks collapse in web UI after completion Issue created by mbuchove Dynamic workflows (using the
@dynamic
decorator) will expand out the dynamically created tasks in the web UI after they are run, and will be displayed even after completion:

Screen Shot 2022-12-02 at 1 18 01 PM

however, after that same execution is refreshed, that expansion into nodes collapses, and the information of the workflow structure is no longer available:

Screen Shot 2022-12-14 at 8 11 08 PM

here is example code that defines the overall dynamic workflow:
Copy code
@dynamic
def train_workflow_inner(
    recipe_path: str,
    k_folds: int = 1,
) -> int:

    data_flytedir = data_prep_task(recipe_path=recipe_path, recipe_hash=recipe_hash)

    s = None
    for i in range(k_folds):
        model_and_data_flytedir = training_task(
                data=data_flytedir,
                k_folds=k_folds,
                i_fold=i,
        )
        s = eval_task(data=model_and_data_flytedir)

    return s
flyteorg/flyte