<@ULVA73B9P> Does task results persistance work in...
# marvin-in-the-wild
d
@Marvin Does task results persistance work in a subflow when parent flow is retried? As far as I see in this case persistence is not working.
m
It appears that there isn't specific documentation discussing the persistence of task results in subflows when a parent flow is retried. However, here are some relevant pointers that may help: 1. Persistence Configuration: - Persistence can be controlled using the
persist_result
parameter at both the flow and task levels. You can manually set
persist_result=True
to ensure that results are persisted. - For example:
Copy code
from prefect import flow, task

      @task(persist_result=True)
      def my_task():
          return 42

      @flow(persist_result=True)
      def my_flow():
          result = my_task()
          return result
Source: Prefect Documentation - Persistent Results 2. Subflow Execution: - Subflows inherit configuration from the parent flow unless otherwise specified. This includes result persistence settings. - If the parent flow does not persist results, you may need to explicitly configure the subflow to persist results. 3. GitHub Discussions: - There was no direct mention of this specific issue on GitHub. However, you can check related discussions and updates which may provide additional insights: - Add configuration of results Given these points, I would recommend explicitly configuring both your parent and subflows to persist results if you are facing issues during retries.