FreeExam
A closed notebook, a blank card, and a pencil on a wooden desk.

Training pipelines

50 cards

DAGs, data contracts, snapshots, artifacts, registries, and what gets promoted.

Card 1 of 50

Front. Pipeline. What is a training pipeline?

These cards are original study material. They are not questions from a named employer or a live hiring loop.

All 50 cards in this deck

  1. 1.Pipeline

    What is a training pipeline?

    An automated sequence of steps that turns source data into a validated, versioned model: extract, validate, build features, train, evaluate, register.

  2. 2.Dag

    What is a DAG in pipeline orchestration?

    A directed acyclic graph of tasks, where edges say which tasks must finish before others start.

  3. 3.Orchestrator

    What does an orchestrator such as Airflow, Dagster, or Kubeflow do?

    Schedules tasks, runs them in dependency order, retries failures, and records each run's status and logs.

  4. 4.Failed-task

    The scheduler paints the whole DAG red after one task fails. Where do you look first?

    At the first task that failed and its own log. Downstream tasks are usually red only because they never ran.

  5. 5.Idempotent-task

    What is an idempotent pipeline task?

    One that gives the same result if run again with the same inputs, for example by overwriting its output partition instead of appending.

  6. 6.Rerun-from

    Why design tasks so a run can restart from the failed step?

    Rerunning hours of earlier work wastes compute and can pick up different data if sources have changed.

  7. 7.Retries

    Which pipeline failures should be retried automatically?

    Transient ones, such as network timeouts or preempted machines. Code bugs and bad data will just fail again.

  8. 8.Trigger

    What can trigger a retraining run?

    A schedule, new data arriving, a drift alert, or a manual request, each recorded with the run.

  9. 9.Snapshot

    What is a data snapshot?

    A fixed, versioned copy or view of the training data at a point in time, which does not change after it is taken.

  10. 10.One-cutoff

    Two tables are read from snapshots taken at different times. What is the risk?

    They describe different moments, so joins can mix states, such as orders that reference shoppers not yet in the other table.

  11. 11.Point-in-time

    What is a point-in-time correct join?

    For each training row, using only feature values that existed at that row's timestamp, never later ones.

  12. 12.Contract

    What is a data contract?

    An agreement between data producer and consumer on schema, types, units, allowed values, and freshness, checked automatically.

  13. 13.Unit-change

    A column keeps its name while its unit changes from cents to dollars. What failed?

    The contract. A change in meaning needs a new column or version, because unchanged names hide the break from every consumer.

  14. 14.Schema-evolution

    What is a backward-compatible schema change?

    One that old consumers can still read, such as adding an optional column. Renaming or retyping a column is not.

  15. 15.Validation-step

    What does a data validation step check before training?

    Schema, row counts, null rates, value ranges, label balance, and duplicates, failing the run when they break expectations.

  16. 16.Feature-store

    What is a feature store?

    A system that defines features once and serves them both offline for training and online for low-latency inference.

  17. 17.Offline-online

    What are the offline and online stores?

    Offline holds full feature history for building training sets. Online holds the latest values for serving.

  18. 18.Feature-version

    Why version feature definitions?

    A model depends on the exact computation used in training. Changing the logic under the same version silently changes the model's inputs.

  19. 19.Revert-store

    You revert a bad feature commit, but the online store still holds the bad values. What else is needed?

    A backfill or recompute of the affected values. Reverting code does not fix data that was already written.

  20. 20.Backfill

    What is a backfill?

    Recomputing a feature or table for past dates, usually after a fix or a new definition.

  21. 21.Same-code

    Why should training and serving share feature code?

    Two separate implementations drift apart and cause training-serving skew.

  22. 22.Fit-stats

    Training standardizes with the snapshot's mean, but serving uses a constant from an old notebook. What is wrong?

    Serving does not match training. The fitted statistics must be saved with the model and loaded at serving.

  23. 23.Preprocessor-artifact

    Why is the preprocessor part of the model artifact?

    Scalers, encoders, and vocabularies fitted on training data are part of the model. Weights without them cannot reproduce its outputs.

  24. 24.Mismatch

    Serving runs model v18 weights with the v19 preprocessor. What is the problem?

    The inputs are transformed differently than v18 was trained on, so its outputs are unreliable even if nothing errors.

  25. 25.Overwrite

    A vocab file next to the weights is overwritten on every train. What happens on rollback?

    The old weights load with the new vocabulary. Every artifact needed for a version must be stored with that version, never overwritten.

  26. 26.Immutable

    Why should model artifacts be immutable?

    So a version always means the same files, and rollbacks and audits are trustworthy.

  27. 27.Content-hash

    What is content-addressed storage for artifacts?

    Naming each file by a hash of its contents, so identical files are stored once and any change gets a new name.

  28. 28.Registry

    What is a model registry?

    A catalog of model versions with their artifacts, metrics, lineage, and stage, such as staging or production.

  29. 29.Pointer

    Serving points at a model version in the registry. What does moving that pointer change?

    Only which version is served. Anything not bundled with the version, such as a shared preprocessor in the image, stays as it was.

  30. 30.Lineage

    What is model lineage?

    The record of exactly which data snapshot, code commit, config, and environment produced a model version.

  31. 31.Reproduce

    What must be pinned to reproduce a training run?

    Code commit, data snapshot, config and hyperparameters, random seeds, and the container image with locked dependencies.

  32. 32.Image-digest

    Why pin a container image by digest rather than tag?

    A tag such as latest can be moved to a new image. A digest always refers to the same bytes.

  33. 33.Lockfile

    What does a dependency lockfile do?

    Records exact versions of every library, so rebuilding the environment later gives the same packages.

  34. 34.Determinism

    Why can two runs with the same seed still differ slightly?

    Nondeterministic GPU kernels, parallel data loading, and floating-point order can vary. Strict determinism needs specific settings.

  35. 35.Experiment-tracking

    What does an experiment tracker record?

    Each run's parameters, metrics over time, artifacts, code version, and environment, so runs can be compared.

  36. 36.Oom-change

    Training runs out of memory after a batch-size change, on the same machine and data. What is the likely cause?

    The batch-size change itself. Activation memory grows with batch size, so compare the configs of the failing and last green runs.

  37. 37.Diff-runs

    How do you find what changed between a green run and a failing one?

    Compare their code commits, configs, data snapshots, images, and machines from the recorded lineage.

  38. 38.Preemption

    How do pipelines cope with preemptible machines?

    Save training checkpoints regularly and resume from the latest one when a new machine starts.

  39. 39.Eval-gate

    What is an evaluation gate?

    A pipeline step that blocks promotion unless the new model meets set thresholds and does not regress against the current model.

  40. 40.Golden-set

    What is a golden evaluation set?

    A fixed, versioned set of examples used to compare every candidate model the same way.

  41. 41.Golden-fixed

    Why must the golden set stay fixed across promotions?

    If it is rebuilt each night, score changes mix model changes with data changes, and comparisons lose meaning.

  42. 42.Slices

    Why evaluate on slices in the gate?

    An overall gain can hide a regression in an important segment, which the gate should catch.

  43. 43.Auto-ship

    What is the risk of shipping every green training run automatically?

    Green only means the pipeline ran and passed its checks. Problems the checks miss go straight to production.

  44. 44.Promotion

    What usually happens between registering a model and full production?

    Gate checks, shadow or canary traffic, monitoring, and sometimes human approval, before the pointer moves for all traffic.

  45. 45.Rollback-ready

    What does a fast model rollback need?

    The previous version's full artifact bundle still stored and loadable, and a one-step pointer change in serving.

  46. 46.Pipeline-tests

    What tests belong in CI for a training pipeline?

    Unit tests for feature code, schema tests, a small end-to-end run on sample data, and checks that artifacts load in serving.

  47. 47.Caching

    What is step caching in pipelines?

    Reusing a step's output when its code and inputs are unchanged, skipping recomputation.

  48. 48.Cache-key

    What must a step's cache key include?

    The code version, all input data versions, and parameters. Missing any of them returns stale outputs.

  49. 49.Sla

    What is a pipeline SLA?

    A deadline for when outputs must be ready, such as the nightly model by 06:00, with alerts if it will be missed.

  50. 50.Ownership

    Why give each pipeline and data source an owner?

    So failures and contract breaks reach someone who can fix them quickly.