Writing training data out to pickle