def from_proto(cls, proto): run_data = cls() # iterate proto and add metrics and params for proto_metric in proto.metrics: run_data._add_metric(Metric.from_proto(proto_metric)) for proto_param in proto.params: run_data._add_param(Param.from_proto(proto_param)) return run_data
def from_proto(cls, proto): run_data = cls() # iterate proto and add metrics, params, and tags for proto_metric in proto.metrics: run_data._add_metric(Metric.from_proto(proto_metric)) for proto_param in proto.params: run_data._add_param(Param.from_proto(proto_param)) for proto_tag in proto.tags: run_data._add_tag(RunTag.from_proto(proto_tag)) return run_data
def get_param(self, run_uuid, param_name): """ Returns the value of the specified parameter. :param run_uuid: Unique identifier for run :param param_name: Parameter name within the run :return: Value of the given parameter if logged, else None """ req_body = _message_to_json(GetParam(run_uuid=run_uuid, param_name=param_name)) response_proto = self._call_endpoint(GetParam, req_body) return Param.from_proto(response_proto.parameter)