The Wayback Machine - https://web.archive.org/web/20250828193238/https://pypi.org/project/ml-metadata/
Skip to main content

A library for maintaining metadata for artifacts.

Project description

ML Metadata

Python PyPI

ML Metadata (MLMD) is a library for recording and retrieving metadata associated with ML developer and data scientist workflows.

NOTE: ML Metadata may be backwards incompatible before version 1.0.

Getting Started

For more background on MLMD and instructions on using it, see the getting started guide

Installing from PyPI

The recommended way to install ML Metadata is to use the PyPI package:

pip install ml-metadata

Then import the relevant packages:

from ml_metadata import metadata_store
from ml_metadata.proto import metadata_store_pb2

Nightly Packages

ML Metadata (MLMD) also hosts nightly packages at https://pypi-nightly.tensorflow.org on Google Cloud. To install the latest nightly package, please use the following command:

pip install --extra-index-url https://pypi-nightly.tensorflow.org/simple ml-metadata

Installing with Docker

This is the recommended way to build ML Metadata under Linux, and is continuously tested at Google.

Please first install docker and docker-compose by following the directions: docker; docker-compose.

Then, run the following at the project root:

DOCKER_SERVICE=manylinux-python${PY_VERSION}
sudo docker compose build ${DOCKER_SERVICE}
sudo docker compose run ${DOCKER_SERVICE}

where PY_VERSION is one of {39, 310, 311}.

A wheel will be produced under dist/, and installed as follows:

pip install dist/*.whl

Installing from source

1. Prerequisites

To compile and use ML Metadata, you need to set up some prerequisites.

Install Bazel

If Bazel is not installed on your system, install it now by following these directions.

Install cmake

If cmake is not installed on your system, install it now by following these directions.

2. Clone ML Metadata repository

git clone https://github.com/google/ml-metadata
cd ml-metadata

Note that these instructions will install the latest master branch of ML Metadata. If you want to install a specific branch (such as a release branch), pass -b <branchname> to the git clone command.

3. Build the pip package

ML Metadata uses Bazel to build the pip package from source:

python setup.py bdist_wheel

You can find the generated .whl file in the dist subdirectory.

4. Install the pip package

pip install dist/*.whl

5.(Optional) Build the grpc server

ML Metadata uses Bazel to build the c++ binary from source:

bazel build -c opt --define grpc_no_ares=true  //ml_metadata/metadata_store:metadata_store_server

Supported platforms

MLMD is built and tested on the following 64-bit operating systems:

  • macOS 10.14.6 (Mojave) or later.
  • Ubuntu 20.04 or later.
  • [DEPRECATED] Windows 10 or later. For a Windows-compatible library, please refer to MLMD 1.14.0 or earlier versions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ml_metadata-1.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ml_metadata-1.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ml_metadata-1.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file ml_metadata-1.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ml_metadata-1.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6fa353ad2715d5c8766243b50d4ae00da2e5174e563cb5799dfd78fa7751a01d
MD5 8a3c8baf29507b57db9ab7c22eb1b072
BLAKE2b-256 bfb5834aad56905b005dbc1952306f43f028c9cf13c3921fce1676ac3e089bd2

See more details on using hashes here.

File details

Details for the file ml_metadata-1.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ml_metadata-1.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 83eafa17bca61117c1794de311fa0fe33b2672982a1f6dedb54a467bfd8c967f
MD5 6c443ed8fbbdadf19ffcc5c9babf04f6
BLAKE2b-256 615ae5179194ba3f03996e35fc02dbdae95fd4b6ce193ff6be37d3375ff27d78

See more details on using hashes here.

File details

Details for the file ml_metadata-1.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ml_metadata-1.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5d0403b8601515deeb1f63d420be6731d394c88942498c59a86954500d2dc54a
MD5 b342dc9e31268676165f523e33a9f513
BLAKE2b-256 af8f5db8ba6abf272a2a4324ae429fec5725996c145d149c661eef9d828c6538

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page