Channels
datahub-flyte
scipy-2023-workshop
flyte-school
agent-support-memverge
flyte-build
flyte-users-berlin
scipy-2023-sprint
auth
flyte-bazel
large-language-models
contribute
bioinformatics-computational-biology
great-content
in-flyte-conversations
flyte-on-gcp
show-and-tell
shameless-promotion
linkedin-flyte
random
deployment
hacktoberfest-2023
flyte-github
feature-discussions
linen-test
flytelab
flytekit-java
integrations
ray-on-flyte
conference-talks
release
flyte-ui-ux
workflow-building-ui-proj
writing-w-sfloris
jobs
hacktoberfest-2022
torch-elastic
flyte-console
engineeringlabs
helsing-flyte
flyte-documentation
konan-integration
databricks-integration
ray-integration
wg-gpu-types
flytekit
ecosystem-unionml
scipy-2022-sprint
announcements
ask-the-community
flyte-deployment
introductions
events
Powered by
#ask-the-community
Title
# ask-the-community
g
Gaurav Kumar
08/04/2023, 12:32 PM
Is there any way to cache the ContainerTask ?
k
Ketan (kumare3)
08/04/2023, 2:43 PM
Cache=True
g
Gaurav Kumar
08/04/2023, 2:46 PM
I don’t see it here
https://docs.flyte.org/projects/flytekit/en/latest/generated/flytekit.ContainerTask.html
Is this missing in documentation ?
I also tried putting
Cache=True
in the ContainerTask. The wf ran, but task was not cached.
k
Ketan (kumare3)
08/04/2023, 3:29 PM
also cache_version="1.0", you have to sadly use both
Sorry i was wrong
when you are constructing raw tasks - they are always of type Task - check the heirarchy -
https://docs.flyte.org/projects/flytekit/en/latest/_modules/flytekit/core/base_task.html#PythonTask
and then you need to create TaskMetadata and pass that - I was wrong sorry
ContainerTask(metadata=TaskMetadata(cache=True, cache_version="1.0")
g
Gaurav Kumar
08/04/2023, 3:42 PM
Ok. I will try that
Thanks
It worked 🚀. Thanks
2 Views
Post