Introducing pipeline abstraction framework as a precursor to refactoring involved logic of TrainingSetImpl into simpler workflow components