fix metrics bug
@@ -178,6 +178,7 @@ class Metrics(object):
m['hits@k'][k] = round_sigfigs(
self.metrics['hits@' + str(k)] / total, 3)
for k in self.custom_keys:
+ if k in self.metrics:
m[k] = round_sigfigs(self.metrics[k] / total, 3)
return m
