jorwoods
06/02/2020, 9:01 PMtarget (str, optional): location to check for task Result. If a result
exists at that location then the task run will enter a cached state.
`target` strings can be templated formatting strings which will be
formatted at runtime with values from `prefect.context`
If I have a mapped task, and I want it to create separate outputs per map, I see map_index
in prefect.context
, but that relies on my arguments being in the same order each time, correct? Is there a way to pass Parameter values into this target
or the result's location kwarg such that when I look at the directory containing my checkpoint files, I quickly know which ones have completed?Zachary Hughes
06/02/2020, 9:17 PMmap_index
, but you're correct-- that does rely on order being the same. We have a PR underway that I think will help you address this exact issue, though! It'll allow folks to specify based on task inputs and flow parameters. Here's the link if you're curious:
https://github.com/PrefectHQ/prefect/pull/2698jorwoods
06/02/2020, 9:19 PMMarwan Sarieddine
06/02/2020, 9:35 PMResult.location
vs target
and how caching works - this PR seems to allow much more flexible templating for Result.location
- but what about target ?Result.location
template but it doesn’t seem to extend target’s templating - or am I missing something here ?Zachary Hughes
06/02/2020, 9:57 PMMarwan Sarieddine
06/02/2020, 10:14 PM