ancient-wolf-19325
06/24/2024, 5:22 PMError: rpc error: code = InvalidArgument desc = workflow with different structure already exists
# Answer
Yes, you can disable caching for a specific Flyte workflow execution by using the overwrite_cache parameter. This parameter can be set when launching the workflow execution, ensuring that all cached values are overwritten and the tasks are executed afresh.
According to this discussion, the overwrite_cache flag can be passed when you launch an execution. This is supported in Flyte's ExecutionSpec and can be utilized via FlyteRemote or Flyte's CLI.
Here's an example of how to use the overwrite_cache parameter with FlyteRemote:
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
remote = FlyteRemote(config=Config.auto(), default_project="my_project", default_domain="development")
# Assuming you have a workflow called `my_workflow`
execution = remote.execute(
remote.fetch_workflow(name="my_workflow"),
inputs={"input1": "value1"},
overwrite_cache=True # This disables caching for this execution
)
Would you like more details on this?
Sources:
- Flyte discussion on caching
- Flyte documentation on ExecutionSpec
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1719249712.610649 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.