I have been working with Vertex AI pipelines for 3 months. I started with migrating projects from old dedicated Kubernetes infrastructure to Vertex AI Python component based pipelines. I created a template pipelines which were running fine until last week. I recently made some changes and my pipeline fails giving me the error message Failed to evaluate the expression with error: UNKNOWN: No value with name "True" found in Activation; Failed to evaluate the TriggerPolicy.condition field.
My pipeline definition looks as follows
@kfp.v2.dsl.pipeline(name="my-custom-pipeline-name", )
def my_pipeline_new(
ENV: str = "dev",
ISO_CODE_COUNTRY: str = "DE",
DEFAULT_TRUE_FLAG: bool=True,
ENABLE_PERSIST_RESULTS:bool= True,
SOME_FLAG: bool = True
):
with kfp.v2.dsl.Condition(DEFAULT_TRUE_FLAG==True) as C1:
with kfp.v2.dsl.Condition(SOME_FLAG== True):
some_module_obj = some_python_based_component(env=ENV, iso_code= ISO_CODE_COUNTRY, enable_persist_results= ENABLE_PERSIST_RESULTS)
My current KFP version is 1.7.0. I am totally lost here to find out why my pipeline has suddenly stopped working.
Could there any possibility that some upgrades occurred in Vertex AI Pipelines that I am unaware of?
Any suggestions / ideas would be much appreciated.
I have been doing trial and error methods to see but my pipeline does not even triggers and it fails in the beginning phase. When I try to run my python based component without any conditions it runs totally fine but with conditions it is just failing.
To make sure my suspicion is correct, I made a dummy pipeline which also seems to fail with dsl conditions.
import kfp
from kfp.v2.dsl import (
component,
Dataset,
Input,
Output,
Metrics,
Artifact,
ClassificationMetrics,
Model,
Metrics,
Dataset,
OutputPath,
InputPath,
Condition,
)
@component
def component_A(flag: bool):
if flag:
print("Flag is true.")
else:
print("Flag is false.")
@component
def component_B():
print("Running component B.")
@kfp.dsl.pipeline(
name="conditional-pipeline",
description="A simple pipeline with a condition",
pipeline_root="gs:bucket-name"
)
def my_pipeline(flag: bool = True):
with Condition(flag == True):
a = component_A(flag)
b = component_B()
PIPELINE_ROOT = "{}/pipeline_root".format("MY-GCS-BUCKET")
Here is the snippet of pipeline which fails and throws error:
Simple Condition Code Failing