<@ULVA73B9P> Within a prefect task, am I able to r...
# ask-marvin
b
@Marvin Within a prefect task, am I able to run something in parallel, such as hitting an external API?
m
Yes, within a Prefect task, you can run operations in parallel. Prefect supports various task runners that provide an execution environment for tasks, which allow you to run tasks concurrently. For example, using the
DaskTaskRunner
or the
RayTaskRunner
, you can specify in a flow decorator to run the tasks called in that flow. The default task runner is the
ConcurrentTaskRunner
. Tasks can be submitted to the task runner with the
.submit
method to run them asynchronously and in parallel. Here are some references from the Prefect documentation that provide more information: - Dask and Ray Task Runners - Successfully Deploying a Task Queue - Concepts: Tasks These guides highlight how to set up and use concurrent or parallel task execution within your Prefect workflows.