In this article
Define the intended input rows before mapping: pair related values by position and mark shared iterable configuration explicitly with unmapped.
Describe the rows before submitting work
A classification task receives document text, its language and a shared list of allowed labels. The intended unit of work is a document with its own language and the complete label set. Prefect’s task mapping reference requires mapped iterables to have equal lengths. Mapping follows their corresponding positions; it does not automatically generate every combination of all supplied lists.
Pair related fields deliberately
The task runner implementation collects iterable parameters, checks their lengths and constructs each call from values at the same position. A mismatch raises an error rather than silently dropping a tail. Equal lengths still do not prove correct relationships: documents and languages sorted independently can have matching sizes but incorrect pairs. Build related fields from the same source records or retain an explicit document identifier for validation.
Keep a shared list whole
The annotation reference defines unmapped for passing an iterable unchanged to all generated runs. Wrap the shared label list when each document needs that entire configuration. Without this distinction, an iterable configuration can be treated as another mapped input, producing length errors or unintended element-wise values. Ordinary non-iterable constants are treated as static, but a list’s meaning should not depend on a reader guessing that it is configuration.
Prepare combinations when that is the actual experiment
If the task should evaluate every document under every prompt variant, construct the intended combination records explicitly before submission. This is a different workload from positional pairing. Preserve document and variant identifiers in each result so later aggregation can distinguish missing evaluations and failed evaluations. Task budgets should reflect the generated workload rather than the length of just one original input list.
Review shape before interpreting quality
Inspect a representative generated call to confirm that it receives the correct document, matching language and full label set. Then retrieve and interpret execution results separately from submission. Tool observations help retain those concrete inputs. A poor classification caused by a split configuration or mismatched language is an input-construction defect; changing the model cannot establish that the intended mapping experiment was ever run.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.