fix bug for udm
This commit is contained in:
parent
6c436e66c0
commit
db8aa257c5
|
@ -95,7 +95,7 @@ class UserDefinedTargetObjective(BaseTargetObjective):
|
||||||
self.pprint = pprint
|
self.pprint = pprint
|
||||||
|
|
||||||
def compute(self, metrics, observation_time):
|
def compute(self, metrics, observation_time):
|
||||||
return metrics[self.name]
|
return metrics.get(self.name, 0)
|
||||||
|
|
||||||
class TargetObjectives:
|
class TargetObjectives:
|
||||||
LESS_IS_BETTER = LESS_IS_BETTER
|
LESS_IS_BETTER = LESS_IS_BETTER
|
||||||
|
|
Loading…
Reference in New Issue