def to_proto(self): run_data = ProtoRunData() run_data.metrics.extend([m.to_proto() for m in self._metric_objs]) run_data.params.extend([ ProtoParam(key=key, value=val) for key, val in self.params.items() ]) run_data.tags.extend([ ProtoRunTag(key=key, value=val) for key, val in self.tags.items() ]) return run_data
def to_proto(self): param = ProtoParam() param.key = self.key param.value = self.value return param