-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[backend] Unable to disable cache for pipeline steps #10966
Comments
There's a discrepancy between the SDK and the backend about what label to use to control the caching behavior. The backend uses
But the SDK uses pipelines/sdk/python/kfp/deprecated/compiler/_op_to_template.py Lines 185 to 187 in 2c3d9d7
(here and in a few other locations.) As a workaround, you can manually add the label train_op.add_pod_label("pipelines.kubeflow.org/cache_enabled", "false") The SDK should be updated to use the correct label. |
/assign @gregsheremeta |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
/remove-lifecycle stale |
I tested this on KFP 2.3.0 with SDK 2.9.0 (both latest releases as of today), and I verified my previous comment -- it's only the enableCache option in the proto that controls this in KFP v2. And it works as expected for me. I created a pipeline with a single component/task. First, I set caching to enabled via
When I upload and run this, the first run causes 3 pods to be created. When I run it a second time, the third pod (the one that runs my component) is skipped / cached. The driver log (second pod) outputs: Next, I copied the pipeline to a new file, and I set caching to disabled via
No matter how many times I run this, all three pods are created. The component is never cached / the third pod is never skipped. Note the diff between the two yamls (other than names) is:
root.dag.tasks.COMPONENT.cachingOptions is what controls it, and that is the only thing being evaluated in driver where the caching decision is made. Closing works-as-expected. /close |
@gregsheremeta: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Environment
How did you deploy Kubeflow Pipelines (KFP)?
Using Kustomize, in GKE
KFP version:
Pipelines version 2.2.0
KFP SDK version:
SDK version 1.8.22 and 2.7.0 (both have this issue)
Steps to reproduce
I have a pipeline like this:
When compiling this pipeline, the Pod still gets these annotations
and no matter what I try, kubeflow keeps caching the steps which makes no sense since our underlying data changes, but the parameters are the same. Also tried all of the suggestions here, including modifying the mutating admission webhook, but nothing works:
#4857
https://www.kubeflow.org/docs/components/pipelines/v1/overview/caching/
https://www.kubeflow.org/docs/components/pipelines/v2/caching/
The only thing that sort-of works is reverting kubeflow pipelines back to 2.0.5. The annotations are then still there, but somehow kubeflow ignores them and doesn't cache with that version.
Expected result
Kubeflow stops caching when I ask it to.
Impacted by this bug? Give it a 👍.
The text was updated successfully, but these errors were encountered: