<@ULVA73B9P> What is the difference between runnin...
# ask-marvin
a
@Marvin What is the difference between running a task with
.fn
and without in Prefect 2.x
m
In Prefect 2.x, using
.fn
with a task refers to directly calling the underlying function of a task, bypassing Prefect's orchestration features. This means that when you use
.fn
, the task runs immediately like a regular Python function without any of Prefect's metadata handling, state management, or logging. Conversely, calling a task without
.fn
involves Prefect's orchestration, meaning the task runs with Prefect's infrastructure, including metadata about upstream dependencies, automatic logging, and state management. For more details on tasks in Prefect 2.x, you can refer to the Prefect 2.x documentation on tasks.