Open AndersBennedsgaard opened 4 days ago
I was trying to trigger caching using the .set_caching_options field of the returned components, as explained here: https://www.kubeflow.org/docs/components/pipelines/user-guides/core-functions/caching/ However, I want to have control when it is disabled/enabled, so I tried to use something like the following:
.set_caching_options
from kfp import compiler from kfp import dsl @dsl.component(base_image="python:3.8") def say_hello(name: str) -> str: hello_text = f'Hello, {name}!' print(hello_text) return hello_text @dsl.pipeline def pipeline(enable_caching: bool): hello_task = say_hello(name="World") hello_task.set_caching_options(enable_caching) compiler.Compiler().compile(pipeline, "pipeline.yaml")
On KFP SDK v2.8.0 this returns a TypeError: 'PipelineParameterChannel' object cannot be interpreted as an integer A similarly sounding error is returned on lower versions
'PipelineParameterChannel' object cannot be interpreted as an integer
It should be able to optionally trigger caching
Impacted by this bug? Give it a 👍.
Environment
Steps to reproduce
I was trying to trigger caching using the
.set_caching_options
field of the returned components, as explained here: https://www.kubeflow.org/docs/components/pipelines/user-guides/core-functions/caching/ However, I want to have control when it is disabled/enabled, so I tried to use something like the following:On KFP SDK v2.8.0 this returns a TypeError:
'PipelineParameterChannel' object cannot be interpreted as an integer
A similarly sounding error is returned on lower versionsExpected result
It should be able to optionally trigger caching
Materials and Reference
Impacted by this bug? Give it a 👍.