Making ClassificationModel serializable