summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-01-10 09:43:25 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-01-10 09:43:25 +0100
commit45b4b2c59b9117ec6aac7ac5f9f2027a0d42e244 (patch)
tree10cda4dea054e0dc0d93f4d6c9b1578193160651
parent5adc39c8de1fbda6e1ba9abcaaaf17516eb046ae (diff)
show-quality=table: Handle missing LUT models
-rw-r--r--lib/cli.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/cli.py b/lib/cli.py
index a1655c6..5accc1f 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -214,12 +214,14 @@ def model_quality_table(
if model[key][attr]["mae"] > static[key][attr]["mae"]:
buf += " :-("
elif (
- model[key][attr]["mae"] <= 2 * lut[key][attr]["mae"]
+ lut is not None
+ and model[key][attr]["mae"] <= 2 * lut[key][attr]["mae"]
and static[key][attr]["mae"] > 4 * lut[key][attr]["mae"]
):
buf += " :-D"
elif (
- static[key][attr]["mae"] - model[key][attr]["mae"]
+ lut is not None
+ and static[key][attr]["mae"] - model[key][attr]["mae"]
> model[key][attr]["mae"] - lut[key][attr]["mae"]
and static[key][attr]["mae"] > 1.1 * lut[key][attr]["mae"]
):