summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"]
):