Understanding data lineage, model versioning, and source citation is essential for reproducibility, compliance, and secure production ML.
- You must know where data originated, how it was processed, and where resulting artifacts are stored.
- Data lineage records the origin of data and every transformation applied during its lifecycle.
- Note: “feature” refers to a data attribute used by a model, not a software feature.

- Data integrity: demonstrate that data has not been tampered with.
- Compliance and auditability: provide an auditable trail for regulators and internal auditors.
- Model reproducibility: re-create models, experiments, and production runs with confidence.

- Model binaries and weights
- Datasets (raw and processed)
- Hyperparameters, training run metadata, and evaluation metrics
- Container images and runtime environment definitions
- Source code, preprocessing scripts, and transformation logic

- Code: Store training and inference code in a Git repo (e.g., GitHub, AWS CodeCommit). Tag releases and keep commit hashes with experiment metadata.
- Datasets: Use storage that supports immutability and versioning (e.g., Amazon S3 with versioning or a dataset registry). Include metadata, tags, and unique prefixes to identify dataset versions.
- Containers: Publish runtime images to a registry (e.g., Amazon ECR). Use immutable references (digests) or incremented version tags rather than overwriting tags in place.

Treat container images as immutable artifacts: reference images by digest or incremented version, and avoid in-place tag mutations so exact runtime environments remain reproducible.

- Model Registry: centralizes trained models, groups them into model packages or model groups, and manages model versions (v1, v2, …). Stores associated metadata such as hyperparameters and metrics.
- Model Cards: human-readable snapshots describing training details, intended use, limitations, data sources, and evaluation metrics for transparency and compliance.
- Lineage Tracking: records relationships and the workflow graph connecting datasets, training jobs, container images, and outputs so you can query and reconstruct workflows.
- Feature Store: a centralized feature repository that supports feature discovery, consistency between training and inference, point-in-time queries, and feature lineage (provenance of how features were derived).

- Which models were trained using a specific dataset?
- Which datasets were used with a particular container image?
- What are the dependencies of a model (libraries, feature transforms, preprocessing steps)?

- Reusable, discoverable feature sets for training and inference.
- Consistent feature values across training runs and production inference.
- Feature lineage: provenance for raw input data, references to transformation code, and metadata that help enforce integrity and compliance.


Further reading and references
- Amazon SageMaker documentation: https://docs.aws.amazon.com/sagemaker/latest/dg/whatis.html
- SageMaker Model Registry: https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry.html
- SageMaker Feature Store: https://docs.aws.amazon.com/sagemaker/latest/dg/feature-store.html
- Amazon ECR (container registry): https://docs.aws.amazon.com/AmazonECR/latest/userguide/what-is-ecr.html