fix bug for udm

This commit is contained in:
bohanjason 2020-04-28 00:37:45 -04:00 committed by Dana Van Aken
parent 6c436e66c0
commit db8aa257c5
1 changed files with 1 additions and 1 deletions

View File

@ -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