Allow setting of task cache_policy globally #16240
Unanswered
Jezreel-Zamora-Paidy
asked this question in
Ideas
Replies: 1 comment 3 replies
-
I think we might be able to handle this better by failing more gracefully when cache key computation fails. We could fall back to the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
We recently run into an error when migrating to Prefect version 3 where one of our tasks failed to compute the cache key of a tasks because the input parameter contains Kafka DeserializingConsumer object and it fails to pickle it ( See the error below). Most of our tasks does not really need task caching and a lot of them contains an input parameter that is similar DeserializingConsumer object which will fail with the similar error with the default cache_policy.
Having an ability to set the cache_policy globally should be an option so that we don't have to set the cache_policy for every tasks that we have. Also if we are not setting PREFECT_RESULTS_PERSIST_BY_DEFAULT to True, does it still make sense for the tasks to calculate the cache key?
Error message
Beta Was this translation helpful? Give feedback.
All reactions