Skip to content

Commit

Permalink
Raise ValueError on misconfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
ericup committed Oct 29, 2024
1 parent 579f8d6 commit e49b099
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions celldetection_scripts/cpn_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit e49b099

Please sign in to comment.