diff --git a/components/Python/RestModelServing/restful_sklearn_serving/sklearn_restful_serving.py b/components/Python/RestModelServing/restful_sklearn_serving/sklearn_restful_serving.py index 306fd29..93ef414 100644 --- a/components/Python/RestModelServing/restful_sklearn_serving/sklearn_restful_serving.py +++ b/components/Python/RestModelServing/restful_sklearn_serving/sklearn_restful_serving.py @@ -218,7 +218,8 @@ def predict(self, url_params, form_params): .format(pred_probs, pred_index, prediction, prediction_confidence)) # Total confidence - self._total_confidence_metric.increase(prediction_confidence) + if self._total_confidence_metric: + self._total_confidence_metric.increase(prediction_confidence) if self._num_predictable_classes: # Prediction confidence per class