Registry / ai-ml / ml-metadata

ml-metadata

JSON →
library1.21.0pypypiunverified

A library for maintaining and managing metadata for ML artifacts, executions, and contexts. Current version: 1.17.1. Supports Python 3.9-3.11. Release cadence: roughly quarterly.

pip install ml-metadata
INSTALL
IMPORT
SIG · ML-METADATA
M
ml-metadata
ai-mlpythonv1.21.0
Install
3.6s avg
Import
500ms
Disk
35MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.13.1.dev0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.6s · import 0.500s · 49MB
35MB installed
● package 35MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

metadata_store
from ml_metadata.metadata_store import metadata_store
import ml_metadata
Top-level import does not expose the store; must use submodule
MetadataStore
from ml_metadata.proto import metadata_store_pb2
from ml_metadata import MetadataStore
MetadataStore is a protobuf message, not a direct class

Initialize a fake in-memory MLMD store to verify installation.

import ml_metadata as mlmd from ml_metadata.metadata_store import metadata_store from ml_metadata.proto import metadata_store_pb2 connection_config = metadata_store_pb2.ConnectionConfig() connection_config.fake_database.SetInParent() store = metadata_store.MetadataStore(connection_config) print('ML Metadata store initialized successfully')
Debug
Known issues
breakingDeprecated GetLineageGraph API removed in v1.15.0; use GetLineageSubgraph instead.
fix
Replace calls to GetLineageGraph with GetLineageSubgraph.
affects: >=1.15.0
deprecatedWindows OS support is deprecated as of v1.15.0.
fix
Use Linux or macOS; consider running in a container.
affects: >=1.15.0
deprecatedPython 3.8 support dropped in v1.15.0; Python 3.7 support dropped in v1.13.0.
fix
Use Python 3.9, 3.10, or 3.11.
affects: >=1.15.0
gotchaProtobuf version constraints: v1.17.0+ requires protobuf>=4.25.2,<5 for Python 3.11; protobuf>4.21.6,<5 for 3.9/3.10.
fix
Ensure protobuf is installed with correct version constraints.
affects: >=1.17.0
Upgrade
Version history
1.21.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
protobufrequiredRequired for serialization
Agent activity
25 hits · last 30 days
node
24
OpenAI (training)
1
Resources
ml-metadata — pip install ml-metadata · libregistry