Report training error. Also, made retrain_on_valid optional.