Andrew
01/16/2024, 5:38 PMpreprocess_only
, for example, is there a way to end after those tasks, and skip the rest, other than putting a conditional around all tasks after processing?Andrew
01/16/2024, 6:23 PMtrain_metrics, eval_metrics, deploy_endpoint = conditional("preprocess_only").if_(preprocess_only.is_false()).then(
train()
evaluate()
deploy()
)
Samhita Alla
Andrew
01/19/2024, 2:04 PMAndrew
01/19/2024, 5:20 PMSamhita Alla
Andrew
01/22/2024, 2:44 PMpipeline_status_id = (
conditional("create_status")
.if_(production_run.is_true())
.then(
create_pipeline_status(...)
)
.else_()
.then(noop())
)
dataset_bucket_dir = (
conditional("dataset_bucket_dir")
.if_(dataset_bucket_dir == "")
.then(
get_dataset_bucket_dir(...)
)
.else_()
.then(return_str(value=dataset_bucket_dir))
)
And the tasks are just decorated with @task(container_image=ImageSpec(...))
This is my workaround right now for our use of conditionals. There may be a better way to handle it, I’m not sure, but we just have several tasks that we only want to run conditionally, depending on which parts of the pipeline we want to runSamhita Alla
This is my workaround right now for our use of conditionals.i think subworkflow is the best technique. regarding conditionals, i think the latest version shouldn't display "branchNode". which version of flyte are you using?
Andrew
01/22/2024, 3:44 PM1.10.2
right nowAndrew
01/22/2024, 3:45 PMflytekit
Samhita Alla
Andrew
01/22/2024, 3:49 PMAndrew
01/22/2024, 3:49 PMSamhita Alla
Samhita Alla
Andrew
01/22/2024, 4:03 PMversion: v0.1.10 # VERSION
Andrew
01/22/2024, 4:04 PMAndrew
01/22/2024, 4:08 PMdb3132ac910ddb8c68a643990ddf10eafb6163d3
if that helpsSamhita Alla
Samhita Alla
Andrew
01/22/2024, 4:21 PMAndrew
01/22/2024, 4:22 PMflyte-core
directory, so that’s where I pulled that from. Sorry for the confusionSamhita Alla
Andrew
01/22/2024, 4:29 PMAndrew
01/30/2024, 3:35 PMSamhita Alla
Andrew
01/30/2024, 5:25 PM