def from_proto(cls, proto): tags = [RunTag.from_proto(proto_tag) for proto_tag in proto.tags] return cls(proto.run_uuid, proto.experiment_id, proto.name, proto.source_type, proto.source_name, proto.entry_point_name, proto.user_id, proto.status, proto.start_time, proto.end_time, proto.source_version, tags, proto.artifact_uri)
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