# prefect-community

Matthew Roeschke

04/28/2022, 10:21 PM
I have a task in a functional API flow that has one task that calls
. I added
to this task I got this Userwarning I don’t really know how to addressed based on the link. I thought I could pass the results from a functional task to another task?
Copy code
UserWarning: Task <...> has retry settings but some upstream dependencies do not have result types. See <> for more details.

Anna Geller

04/29/2022, 12:39 AM
In order for your task to be retried by Prefect, it may need some input data from upstream tasks. For that reason, you would need to have results configured on your tasks. It looks like you don't have those and that's why Prefect warns you that the retries may not work properly. You could add e.g. Prefect Results to make that easy, or something simple that works across platforms such as S3. This page explains it in detail but you could configure it as simple as:
Copy code
from prefect import Flow, task
from prefect.engine.results import PrefectResult

def my_task():
    return 3
>>> state.result[first_result]._result.value
>>> state.result[first_result]._result.location
Here is explanation from the docs: "For example, suppose task A is configured to use result A, and task B to use result B, and that A passes data downstream to B. If B fails and requests a retry, it needs to cache its inputs, one of which came from A. If you are using Cloud, Cloud will use results to persist the input cache, and since the data is from task A it will use the result configured on A."
by default, when you use e.g. S3 storage, Prefect will use S3 also for results automatically, unless you explicitly turn off checkpointing
Copy code
@task(checkpoint=False) # to disable

Matthew Roeschke

04/29/2022, 1:08 AM
Thanks for the context! Just the explanation I needed.
👍 1