update generate_training