Skip to content
Snippets Groups Projects
Commit a3fdda5a authored by juacrumar's avatar juacrumar
Browse files

add a separate warning for mul=0

parent 2fb1696f
Branches
Tags
1 merge request!945Expose positivity threshold in the runcard
...@@ -129,6 +129,8 @@ def check_lagrange_multipliers(parameters, key): ...@@ -129,6 +129,8 @@ def check_lagrange_multipliers(parameters, key):
multiplier = lagrange_dict.get("multiplier") multiplier = lagrange_dict.get("multiplier")
if multiplier is not None and multiplier < 0: if multiplier is not None and multiplier < 0:
log.warning("The %s multiplier is below 0, it will produce a negative loss", key) log.warning("The %s multiplier is below 0, it will produce a negative loss", key)
elif multiplier is not None and multiplier == 0:
log.warning("The %s multiplier is 0 so it won't contribute to the loss", key)
threshold = lagrange_dict.get("threshold") threshold = lagrange_dict.get("threshold")
if threshold is not None and not _is_floatable(threshold): if threshold is not None and not _is_floatable(threshold):
raise CheckError(f"The {key}::threshold must be a number, received: {threshold}") raise CheckError(f"The {key}::threshold must be a number, received: {threshold}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment