My graph starts with a common component after which, the process is split in two leaves, one for variables and the second for events. both leaves usea a conditional to execute some components if there is data available.
After procesing both leaves (variables and events) there is another component in common which doesn´t recibe anything as argument from the previous leaves but that is dependent form both.
My code:
@kfp.dsl.pipeline(name='name')
def pipeline_hvac(some_parameters:str):
# Pipeline Varaibles #
c0_load_config_task = c0_load_config(some_parameters=some_parameters)
c1_var_load_task = c1_var_load(config_path=c0_load_config_task.outputs['config_path'])
with kfp.dsl.Condition(condition=(c1_var_load_task.outputs['output'] == 'true')) as cond_variables:
c2_var_process_task = c2_var_procesado(
config_path=c0_load_config_task.outputs['config_path'],
df_var_diario_path=c1_var_load_task.outputs['df_var_clean_path'])
c3_var_escritura(
config_path=c0_load_config_task.outputs['config_path'],
df_variables_estado_dia_path=c2_var_process_task.outputs['df_variables_estado_dia_path'],
df_estado_eaa_path=c2_var_process_task.outputs['df_estado_eaa_path'])
c1_eve_load_geo_task = c1_eve_load_geo(
config_path=c0_load_config_task.outputs['config_path'])
c2_eve_procesado_task = c2_eve_procesado(config_path=c0_load_config_task.outputs['config_path']).after(c1_eve_load_geo_task)
with kfp.dsl.Condition(condition=(c2_eve_procesado_task.outputs['output'] == 'true')) as cond_eventos:
c3_eve_escritura(
config_path=c0_load_config_task.outputs['config_path'],
dict_results_path=c2_eve_procesado_task.outputs['dict_results_path'])
c4_salud_unificado(
config_path = c0_load_config_task.outputs['config_path']).after(cond_variables).after(cond_eventos)
I want to execute this last component (c4_salud_unificado) after the execution of both leaves regardless of the existence of data from one or both leaves. I thougth that using the .after() condition it would execute the component regardless of the result of the conditionals but it doesn´t.
If one of the conditions is skip, my final common component is not trigger. ¿What can i do to execute this last component?