From db8aa257c5d51af3972f9d1afeb40a7a8fbac790 Mon Sep 17 00:00:00 2001 From: bohanjason Date: Tue, 28 Apr 2020 00:37:45 -0400 Subject: [PATCH] fix bug for udm --- server/website/website/db/base/target_objective.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/website/website/db/base/target_objective.py b/server/website/website/db/base/target_objective.py index 169e499..8b77b21 100644 --- a/server/website/website/db/base/target_objective.py +++ b/server/website/website/db/base/target_objective.py @@ -95,7 +95,7 @@ class UserDefinedTargetObjective(BaseTargetObjective): self.pprint = pprint def compute(self, metrics, observation_time): - return metrics[self.name] + return metrics.get(self.name, 0) class TargetObjectives: LESS_IS_BETTER = LESS_IS_BETTER