<#4240 [UI Feature] Graphs not representing correc...
# flyte-github
a
#4240 [UI Feature] Graphs not representing correct tasks Inputs/Outputs when using conditionals Issue created by jnavarro86 Motivation: Why do you think this is important? When using conditionals in a workflow, I found that the graph doesn't represent correctly the inputs and outputs dependencies between tasks. To the workflow:
Copy code
@workflow
def some_training_job(n_training_jobs: int = 1):
    training, validation, test = do_train_fech_data()
    image_name = build_and_push_image()
    ( conditional("Single train or HPO")
        .if_(n_training_jobs > 1)
        .then(run_hyperparameters_optimisation_job(
            single_training_job_image=image_name,
            training=training, 
            validation=validation, 
            test=test,
            n_training_jobs=n_training_jobs
        ))
        .else_()
        .then(run_single_trainin_job(
            single_training_job_image=image_name,
            training=training, 
            validation=validation, 
            test=test
        ))
    )
I would expect the output of
do_train_fech_data
and
build_and_push_image
to be the inputs of
run_hyperparameters_optimisation_job
or
run_single_trainin_job
. However, the graph shows:

Screenshot 2023-10-13 at 15 25 39▾

It looks like the outputs of those 2 tasks are not used at all. However, the workflow works correctly. The inputs of the task
run_single_trainin_job
/`run_hyperparameters_optimisation_job` are the expected ones from the previous tasks. Goal: What should the final outcome look like, ideally? I would expect a graph similar to:

Screenshot 2023-10-13 at 15 25 51▾

Where it is clear that the inputs of the task after the conditionals are the outputs of the previous tasks. Propose: Link/Inline OR Additional context No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte