Closed
Description
Probably not a high priority (and maybe not feasible for some reason I haven't thought of) but I find this behavior a bit irritating:
from prefect import task, Flow
from prefect.engine.executors import DaskExecutor
@task
def add(x, y):
return x + y
with Flow('flow') as flow:
for i in range(10):
add(i, 0)
flow.run(executor=DaskExecutor('localhost:8786'))
Result: the constant 0
task is repeated every time, as is the corresponding log:
[2019-09-18 04:37:19,486] INFO - prefect.TaskRunner | Task '0': Starting task run...
[2019-09-18 04:37:19,486] INFO - prefect.TaskRunner | Task '0': Starting task run...
[2019-09-18 04:37:19,489] INFO - prefect.TaskRunner | Task '0': Starting task run...
[2019-09-18 04:37:19,492] INFO - prefect.TaskRunner | Task '0': finished task run for task with final state: 'Success'
[2019-09-18 04:37:19,493] INFO - prefect.TaskRunner | Task '0': finished task run for task with final state: 'Success'
[2019-09-18 04:37:19,497] INFO - prefect.TaskRunner | Task '0': finished task run for task with final state: 'Success'
...
Is there any kind of simple de-duping scheme that might work within a flow, maybe just for Python literals...?
Edit: possibly kind of a dupe of #891 which was already declined...? 🤷♂
Metadata
Metadata
Assignees
Labels
No labels
Activity