update generate_training.py