Hi team.. So I have a flyte task that usually requ...
# flyte-support
l
Hi team.. So I have a flyte task that usually requires caching. There is 1 specific workflow though where we do not want to use caching. Is there a way to disable caching on the fly? I tried passing it a random string argument… and set a default value for the other cases, but that resulted in
Error: rpc error: code = InvalidArgument desc = workflow with different structure already exists
g
have you tried
pyflyte run --remote --overwrite-cache …
l
No… I’m triggering this pipeline using a launchplan
g
how did you trigger? on flyteconsole?
l
Scheduled launchplan
OR via UI
OR Flyte REST api
not pyflyte
g
Screenshot 2024-06-24 at 10.26.52 AM.png
l
Also I need caching disabled for a specific task in the workflow.. and not all the tasks in the workflow
h
I believe we support overridding cache settings per task using
with_overrides
. Just tested locally and it works:
Copy code
@task(cache=True, cache_version="1.0")
def say_hello_cached(name: str) -> str:
    return f"hello {name}"

@workflow
def my_wf_cached(name: str) -> str:
    return say_hello_cached(name=name)

@workflow
def my_wf_uncached(name: str) -> str:
    return say_hello_cached(name=name).with_overrides(cache=False)
l
Fantastic! Thank you
👍 2