diff --git a/biotrainer/utilities/sanity_checker.py b/biotrainer/utilities/sanity_checker.py index b243d3f7..42aafc07 100644 --- a/biotrainer/utilities/sanity_checker.py +++ b/biotrainer/utilities/sanity_checker.py @@ -9,7 +9,7 @@ def __init__(self, output_vars: Dict, mode: str = "Warn"): self.output_vars = output_vars self.mode = mode - def handle_result(self, result: str): + def _handle_result(self, result: str): if self.mode == "Warn": logger.warning(result) elif self.mode == "Error": @@ -32,13 +32,13 @@ def check_test_results(self): precision = test_result_metrics['precision'] recall = test_result_metrics['recall'] if accuracy == precision == recall: - self.handle_result(f"Accuracy ({accuracy} == Precision == Recall for binary prediction!") + self._handle_result(f"Accuracy ({accuracy} == Precision == Recall for binary prediction!") if "predictions" in test_results: predictions = test_results['predictions'] # Check if the model is only predicting the same value for all test samples: if all(prediction == predictions[0] for prediction in predictions): - self.handle_result(f"Model is only predicting {predictions[0]} for all test samples!") + self._handle_result(f"Model is only predicting {predictions[0]} for all test samples!") logger.info("Sanity check on test results successful!")