Fix bug in genTrainMetrics.py