Skip to content
Snippets Groups Projects
Commit f7efc51c authored by Manon Blanco's avatar Manon Blanco
Browse files

Nits

parent 752c8ef1
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !339. Comments created here will be created in the context of that merge request.
......@@ -27,16 +27,16 @@ logger = logging.getLogger(__name__)
NERVAL_THRESHOLD = 0.30
def parse_threshold(arg):
def parse_threshold(value):
try:
f = float(arg)
value = float(value)
except ValueError:
raise ArgumentTypeError("Must be a floating point number.")
if f < 0 or f > 1:
if value < 0 or value > 1:
raise ArgumentTypeError("Must be between 0 and 1.")
return f
return value
def add_evaluate_parser(subcommands) -> None:
......
......@@ -162,7 +162,6 @@ class MetricManager:
metrics["time"] = [values["time"]]
gt, prediction = values["str_y"], values["str_x"]
for metric_name in metric_names:
match metric_name:
case (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment