In an AWS SageMaker pipeline, you need to train a model on streaming data where the training job must be reproducible, and preprocessing should be consistent between training and batch inference. Which approach best satisfies these constraints?

Answer

Use a SageMaker TrainingJob with a custom container and ensure the preprocessing code is bundled inside the same container used for both training and batch inference, Run preprocessing as a separate ProcessingJob and invoke it from both training and batch inference steps using the same S3 output artifacts versioned by input data timestamp

Explanation

Bundling preprocessing inside the training/inference containers or reusing versioned preprocessing artifacts ensures deterministic, consistent transformations. Leaving feature engineering to model defaults or using live online feature retrieval during training can break reproducibility.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list