Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add back task run key #31

Merged
merged 9 commits into from
Sep 20, 2022
Merged

Add back task run key #31

merged 9 commits into from
Sep 20, 2022

Conversation

ahuang11
Copy link
Contributor

Summary

import time
import distributed
from prefect_dask import DaskTaskRunner
from prefect import flow, task

N = 100

@task()
def f(x):
    time.sleep(1)
    return 2 * x

def main():
    start = time.time()
    tasks = f.map(range(N))
    submitted = time.time()
    return sum([t.result() for t in tasks])

flow(task_runner=DaskTaskRunner())(main)()

image

Relevant Issue(s)

Closes #27

Checklist

@ahuang11 ahuang11 merged commit db13386 into main Sep 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dask task names do not match Prefect task names
2 participants