From e49b099e064c2a9c9d15e945f91a8607d10be707 Mon Sep 17 00:00:00 2001 From: ericup Date: Tue, 29 Oct 2024 19:08:03 +0100 Subject: [PATCH] Raise ValueError on misconfiguration --- celldetection_scripts/cpn_inference.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/celldetection_scripts/cpn_inference.py b/celldetection_scripts/cpn_inference.py index 895c074..1bffb76 100644 --- a/celldetection_scripts/cpn_inference.py +++ b/celldetection_scripts/cpn_inference.py @@ -249,8 +249,8 @@ def resolve_model(model_name, model_parameters, verbose=True, **kwargs): if hasattr(model.model, k): setattr(model.model, k, type(getattr(model.model, k))(v)) else: - warn(f'Could not find attribute {k} in model {model_name}. ' - f'Hence, the setting was not changed!') + raise ValueError(f'Could not find attribute {k} in model {model_name}! ' + f'Please check your configuration.') return model