Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Kubeflow Pipelines MLMD Service Protobuf

From Leeroopedia
Knowledge Sources
Domains Metadata_Management, API_Schema
Last Updated 2026-02-13 14:00 GMT

Overview

Auto-generated Go protobuf bindings defining all request/response message types for the ML Metadata Store gRPC service API.

Description

Generated by `protoc-gen-go` (v1.26.0) from `ml_metadata/proto/metadata_store_service.proto`, this is the largest generated file in the repository (10,207 lines). It defines Go structs for every MLMD API operation's request and response messages, organized into CRUD patterns: Put operations (PutArtifacts, PutExecutions, PutEvents, PutContexts, PutTypes, PutLineageSubgraph) and Get operations (GetArtifactsByType, GetExecutionsByID, GetContextsByArtifact, GetLineageGraph, GetEventsByExecutionIDs, etc.).

Usage

Imported by the KFP Go backend alongside the gRPC stubs to make type-safe MLMD API calls for recording and querying pipeline metadata.

Code Reference

Source Location

Signature

package ml_metadata

type PutArtifactsRequest struct {
    Artifacts []*Artifact
    Options   *PutArtifactsRequest_Options
}

type PutArtifactsResponse struct {
    ArtifactIds []int64
}

type GetArtifactsByTypeRequest struct {
    TypeName *string
    Options  *ListOperationOptions
}

type GetArtifactsByTypeResponse struct {
    Artifacts     []*Artifact
    NextPageToken *string
}
// ... 80+ request/response message types

Import

import ml_metadata "github.com/kubeflow/pipelines/third_party/ml-metadata/go/ml_metadata"

I/O Contract

Inputs

Name Type Required Description
Proto descriptor []byte Yes Raw protobuf descriptor from metadata_store_service.proto

Outputs

Name Type Description
Put request types Go structs PutArtifactsRequest, PutExecutionsRequest, PutContextsRequest, etc.
Put response types Go structs PutArtifactsResponse (with generated IDs), etc.
Get request types Go structs GetArtifactsByTypeRequest, GetExecutionsByIDRequest, etc.
Get response types Go structs GetArtifactsByTypeResponse (with entities + pagination), etc.

Usage Examples

Putting Artifacts via Message Types

import ml_metadata "github.com/kubeflow/pipelines/third_party/ml-metadata/go/ml_metadata"

req := &ml_metadata.PutArtifactsRequest{
    Artifacts: []*ml_metadata.Artifact{
        {Uri: proto.String("gs://bucket/data"), TypeId: proto.Int64(1)},
    },
}
// Pass req to gRPC client stub

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment