Home

Awesome

ModelDB: An open-source system for Machine Learning model versioning, metadata, and experiment management.


<p align="center"> <a href="https://hub.docker.com/u/vertaaiofficial"> <img src="https://img.shields.io/docker/v/vertaaiofficial/modeldb-backend?color=534eb5&label=Docker%20image%20version&style=plastic" alt="docker hub" /> </a> <a href="https://pypi.org/project/verta/"> <img src="https://img.shields.io/pypi/v/verta?color=534eb5&style=plastic" alt="PyPI" /> </a> <a href="https://anaconda.org/conda-forge/verta"> <img src="https://img.shields.io/conda/v/conda-forge/verta?color=534eb5&style=plastic" alt="Conda" /> </a> <a href="https://github.com/VertaAI/modeldb/blob/master/LICENSE"> <img src="https://img.shields.io/pypi/l/verta?color=534eb5&style=plastic" alt="License" /> </a> <br> <a href="https://hub.docker.com/u/vertaaiofficial"> <img src="https://img.shields.io/docker/pulls/vertaaiofficial/modeldb-backend?color=534eb5&style=plastic" alt="docker hub" /> </a> <a href="https://pypi.org/project/verta/"> <img src="https://img.shields.io/pypi/dm/verta?color=534eb5&label=PyPI%20Downloads&style=plastic" alt="PyPI" /> </a> <a href="https://github.com/VertaAI/modeldb/graphs/commit-activity"> <img src="https://img.shields.io/github/commit-activity/w/vertaai/modeldb?color=534eb5&style=plastic" alt="Commits" /> </a> <a href="https://github.com/VertaAI/modeldb/graphs/commit-activity"> <img src="https://img.shields.io/github/last-commit/vertaai/modeldb?color=534eb5&style=plastic" alt="Last Commit" /> </a> <br> <a href="https://github.com/VertaAI/modeldb/graphs/commit-activity"> <img src="https://img.shields.io/github/stars/vertaai/modeldb?style=social" alt="Forks" /> </a> <a href="https://twitter.com/intent/follow?screen_name=VertaAI"> <img src="https://img.shields.io/twitter/follow/VertaAI?label=VertaAI&style=social" alt="Twitter" /> </a> <a href="http://bit.ly/modeldb-mlops"> <img src="https://cdn.brandfolder.io/5H442O3W/as/pl546j-7le8zk-5guop3/Slack_RGB.png" alt="Slack" height =30px/> </a> </p> <h3 align="center"> <a href="#up-and-running-in-5-minutes">Quickstart</a> <span> · </span> <a href="https://docs.verta.ai/verta/tutorials/metadata">Workflow</a> <span> · </span> <a href="https://github.com/VertaAI/examples">Examples</a> <span> · </span> <a href="#contributions">Contribute</a> <span> · </span> <a href="http://bit.ly/modeldb-mlops">Support (Slack)</a> </h3>

ModelDB is an open-source system to version machine learning models including their ingredients code, data, config, and environment and to track ML metadata across the model lifecycle.

Use ModelDB in order to:

Features:

If you are looking for a hosted version of ModelDB, please reach out at modeldb@verta.ai.

This version of ModelDB is built upon its predecessor from CSAIL, MIT. The previous version can be found on Github here. The ModelDB project is now maintained by Verta.ai.


What’s In This Document


Up and Running in 5 minutes

  1. Install Docker (and Docker Compose)

  2. Setup ModelDB via Docker Compose

docker-compose -f docker-compose-all.yaml up

Note: modeldb-backend service needs backend/config/config.yaml to run, either clone the repo before running docker-compose or create the file manually.

  1. Install the ModelDB pip package. Note it comes packaged in the verta package.
pip install verta
  1. Version a model or log a workflow. Alternatively, run any of the detailed examples in our repository.
from verta import Client
client = Client("http://localhost:3000")

proj = client.set_project("My first ModelDB project")
expt = client.set_experiment("Default Experiment")

# log the first run
run = client.set_experiment_run("First Run")
run.log_hyperparameters({"regularization" : 0.5})
# ... model training code goes here
run.log_metric('accuracy', 0.72)

# log the second run
run = client.set_experiment_run("Second Run")
run.log_hyperparameters({"regularization" : 0.8})
# ... model training code goes here
run.log_metric('accuracy', 0.83)

That's it! Navigate to http://localhost:3000 to find the ModelDB Web UI and check out the models you just logged.


For information on debugging the Docker-based ModelDB installation, check here.

Other ways to install ModelDB are:

  1. Building the source code and deploying
  2. Deploy on kubernetes via helm
  3. Using a ModelDB ami
  4. If you are looking for a hosted version of ModelDB, please reach out at modeldb@verta.ai.

Documentation

Official documentation for ModelDB can be found here.


Community

For Getting Started guides, Tutorials, and API reference check out our docs.

To report a bug, file a documentation issue, or submit a feature request, please open a GitHub issue.

For help, questions, contribution discussions and release announcements, please join us on Slack.


Architecture

At a high level the architecture of ModelDB in a Kubernetes cluster or a Docker application looks as below:

image

Volumes : The relational database and the artifact store in backend need volumes attached to enable persistent storage.

Repo Structure

Each module in the architecture diagram has a designated folder in this repository, and has their own README covering in depth documentation and contribution guidelines.

  1. protos has the protobuf definitions of the objects and endpoint used across ModelDB. More details here.
  2. backend has the source code and tests for ModelDB Backend. It also holds the proxy at backend/proxy. More details here.
  3. client has the source code and tests for ModelDB client. More details here.
  4. webapp has the source and tests for ModelDB frontend. More details here.

Other supporting material for deployment and documentation is at:

  1. chart has the helm chart to deploy ModelDB onto your Kubernetes cluster. More details here.
  2. doc-resources has images for documentation.

Contributions

As seen from the Architecture ModelDB provides a full stack solution to tracking, versioning and auditing machine learning models. We are open to contributions to any of the modules in form of Pull Requests.

The main skill sets for each module are as below:

  1. backend: If you are interested in Java development or are interested in database design using technologies like Hibernate and Liquibase please take a look at backend README for setup and development instructions.
  2. client: If you are interested in Python or Scala development or are interested in building examples notebooks on various ML frameworks logging data to Modeldb please take a look at client README.
  3. frontend: If you are interested in Node,React or Redux based development please take a look at webapp README

Please reach out to us in slack for any assistance in getting started with the development set up or any other feedback.


License

ModelDB is licensed under Apache 2.0.


Thanks

Thanks to our many contributors and users.