Expand description
Mapped tasks (decisions 69, 70, 74-79): which edges are lanes, the dimensions a mapped task’s instances span, an instance’s place in each, and the master’s resolution of what a task is mapped over.
- A mapped task’s instances are the cartesian product of its mapped lists, the first
argument written varying slowest (
.expand_kwargs: one dimension, a list of dicts). - A lane is an element-wise data edge: the task is mapped over the whole output of a
mapped upstream task, which it references nowhere else; instance
ithen waits only for that upstream’s instancei(70 B). Every other edge into a mapped task counts its upstream as a whole (70.1).
Structs§
- Sources
- What a mapped value is resolved against: the whole outputs of the tasks it references (a
mapped task’s as the list of its instances’ outputs) and their outcomes (
None: skipped).
Enums§
- Dim
- One dimension of a mapped task’s instances.
- Inputs
Error - Why a task instance’s inputs can’t be made.
Functions§
- built_
by_ runner - Whether a value is left to its instance’s runner to build: it holds a template or a
dag_ctxreference, which the master doesn’t render (decision 118), the run’s parameters included, or a secret, which the master never sees. - coordinates
- Instance
index’s place in each dimension ofsizes(the first varying slowest). - count
- The number of instances of
sizes;Nonepastusize. - dims
- A mapped task’s dimensions, in order: each with the parameter it fills (
Nonefor.expand_kwargs, whose elements are dicts of arguments). - follow
pathinto a storedvalue(whatofwhose, for messages), as the runner reads it: a dict shaped like a tag is stored escaped ($dict, B66), a tuple as$tuple.- inputs
- A task instance’s inputs, as JSON: the whole outputs of the upstream tasks it uses (not
its lanes), and for an instance of a mapped task its own arguments under
$expand, with the outcome of each taken from a lane under$expand_outcomes(decision 76), and those its runner builds in their stored form under$expand_values(decision 118). A lane reads its one upstream instance; a mapped list is resolved once perresolved. - is_lane
- Whether
edgeis a lane: an element-wise data edge into a mapped task (70 B). An order edge, or a data edge whose upstream is used as a whole, counts its upstream as a whole. - is_
mapped - Whether
taskis mapped (.expand(...)). - kind_of
- A short description of
json’s kind, for messages (“null”, “a string”). - lane_
sources - The mapped upstream tasks
taskis mapped over element by element (its lanes): each the whole output of a mapped task, referenced nowhere else intask(a second reference,.partial(all=sizes)orsizes[0], makes it count as a whole: 70.1). - narrowed_
whole - The mapped upstream task a dimension narrows element by element though it counts as a
whole (used elsewhere in the task, so not a lane), with the outcomes taken:
.partial(all=results).expand(rows=results.on(Rows)). Its instance whose upstream instance ended with another outcome, or was skipped, is skipped, as on a lane (decision 119). - narrows_
per_ element - Whether
edge’s outcomes are taken per element (narrowed_whole), not on the whole upstream task, whose own outcome is only that its instances ended. - resolve
- The stored JSON
valuestands for, as the runner would resolve it (Nonefor a reference whose edge wasn’t taken). Errors say why a value can’t be resolved here. - resolve_
mapped - What a mapped value stands for, as
resolve, except that the elements of a list written in the file that its runners build (built_by_runner) arenullhere (in a dict, its entries the runners build): each reaches its instance in its stored form (decision 118), and the list’s length is known. - sources
- The whole outputs and outcomes of
tasksin a run, to resolve mapped values against: a mapped task’s output is the list of its instances’ outputs, inmap_indexorder,nullfor one that didn’t succeed (decision 77).knowngives an instance’s state when the caller knows it ahead of the database (a result being applied, its state not stored yet, B78): it is used instead of the stored one.
Type Aliases§
- Resolved
- Mapped lists already resolved, by (run, task, dimension): the instances of one task share them, so assigning N of them resolves each list once, not N times. Kept for one step.