Updated the training script to follow the new paradigm