{"id":24047,"library":"ml-metadata","title":"ML Metadata","description":"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.","status":"active","version":"1.17.1","language":"python","source_language":"en","source_url":"https://github.com/google/ml-metadata","tags":["ml-ops","metadata","machine-learning","lineage"],"install":[{"cmd":"pip install ml-metadata","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for serialization","package":"protobuf","optional":false}],"imports":[{"note":"Top-level import does not expose the store; must use submodule","wrong":"import ml_metadata","symbol":"metadata_store","correct":"from ml_metadata.metadata_store import metadata_store"},{"note":"MetadataStore is a protobuf message, not a direct class","wrong":"from ml_metadata import MetadataStore","symbol":"MetadataStore","correct":"from ml_metadata.proto import metadata_store_pb2"}],"quickstart":{"code":"import ml_metadata as mlmd\nfrom ml_metadata.metadata_store import metadata_store\nfrom ml_metadata.proto import metadata_store_pb2\n\nconnection_config = metadata_store_pb2.ConnectionConfig()\nconnection_config.fake_database.SetInParent()\nstore = metadata_store.MetadataStore(connection_config)\nprint('ML Metadata store initialized successfully')","lang":"python","description":"Initialize a fake in-memory MLMD store to verify installation."},"warnings":[{"fix":"Replace calls to GetLineageGraph with GetLineageSubgraph.","message":"Deprecated GetLineageGraph API removed in v1.15.0; use GetLineageSubgraph instead.","severity":"breaking","affected_versions":">=1.15.0"},{"fix":"Use Linux or macOS; consider running in a container.","message":"Windows OS support is deprecated as of v1.15.0.","severity":"deprecated","affected_versions":">=1.15.0"},{"fix":"Use Python 3.9, 3.10, or 3.11.","message":"Python 3.8 support dropped in v1.15.0; Python 3.7 support dropped in v1.13.0.","severity":"deprecated","affected_versions":">=1.15.0"},{"fix":"Ensure protobuf is installed with correct version constraints.","message":"Protobuf 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.","severity":"gotcha","affected_versions":">=1.17.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from ml_metadata.metadata_store import metadata_store'.","cause":"Incorrect import path; top-level ml_metadata does not contain metadata_store directly.","error":"ImportError: cannot import name 'metadata_store' from 'ml_metadata'"},{"fix":"Import the protobuf module: 'from ml_metadata.proto import metadata_store_pb2' and use 'metadata_store_pb2.MetadataStore'.","cause":"MetadataStore is a protobuf message, not a class in the ml_metadata module.","error":"AttributeError: module 'ml_metadata' has no attribute 'MetadataStore'"},{"fix":"Use 'connection_config.fake_database.SetInParent()' before creating the store.","cause":"Trying to instantiate metadata_store.MetadataStore with wrong connection config or missing SetInParent on fake database.","error":"TypeError: Can't instantiate abstract class MetadataStore with abstract methods..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}