A Dask pipeline gives slightly different results on each run, even with the same data. What usually restores repeatable output?
- Exam domain
- Data Science Pipelines and Workflow Automation13% of the exam
- Difficulty
- Medium
- In this mock
- 7 questions on this domainPractise this domain
Why the exam asks this
Data Science Pipelines and Workflow Automation (13% of the exam)
Objective in the exam guide: Building reproducible pipelines with RAPIDS and Dask
Reproducible pipelines with Dask are named.
Why D is the answer
Setting random seeds and sorting before order-sensitive steps
Parallel frameworks can process partitions in different orders. Fixed seeds for sampling and splits, plus explicit sorting before order-sensitive steps, make results repeatable.
Remember: Seeds and explicit ordering make parallel runs repeatable.
How it works
Distributed pipelines need seeds and explicit ordering to give the same output each run.
In detail
- Seed sampling and splits.
- Sort before order-sensitive operations.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Removing the cluster and using spreadsheetsWrong
Spreadsheets do not scale.
B. Running it only at nightWrong
Time of day is irrelevant.
C. Adding more workers so each run finishes faster and has less time to vary between runsWrongMost tempting
Speed does not fix ordering differences.
Why it tempts: Faster runs sound more stable.
D. Setting random seeds and sorting before order-sensitive stepsRight
Seeds and explicit ordering make parallel runs repeatable.
Use case
An illustrative scenario, not a real incident.
Illustrative: sorting by order ID before a cumulative sum makes every run match exactly.
See it in different ways
flowchart LR S0["Fix seeds"] --> S1["Sort before head or cumulative steps"] --> S2["Pin package versions"] --> S3["Log run settings"]
How to read this chart
- Read it in order: Fix seeds, then Sort before head or cumulative steps, then Pin package versions, then Log run settings.
flowchart TD
Q{"Uses random sampling or order?"}
Q -->|"Random sampling"| A0["Set seeds"]
Q -->|"Order-sensitive step"| A1["Sort first"]How to read this chart
- At "Uses random sampling or order?": if "Random sampling", go to "Set seeds"; if "Order-sensitive step", go to "Sort first".