MLC Bakery logo

MLC Bakery

by jettyio

MLC Bakery is a Python-based service for managing ML model provenance and lineage. It is built with FastAPI and SQLAlchemy.

View on GitHub

Last updated: N/A

What is MLC Bakery?

MLC Bakery is a service designed to manage the provenance and lineage of machine learning models. It provides a structured way to track datasets, entities, activities, and their relationships, ensuring reproducibility and auditability of ML workflows.

How to use MLC Bakery?

To use MLC Bakery, you need to set up the development environment with Python 3.12+, uv, and PostgreSQL. After cloning the repository and installing dependencies, configure the database connection details in a .env file. Run database migrations using Alembic. Start the FastAPI application using uvicorn. The API can then be accessed via the provided endpoints, including Swagger UI and ReDoc for documentation. For deployment, Docker Compose is provided for running the API, database, Streamlit viewer, and Caddy reverse proxy.

Key features of MLC Bakery

  • Dataset management with collection support

  • Entity tracking

  • Activity logging

  • Agent management

  • Provenance relationships tracking

  • RESTful API endpoints

Use cases of MLC Bakery

  • Tracking the origin and transformations of datasets used in model training.

  • Auditing the steps involved in creating and deploying machine learning models.

  • Ensuring reproducibility of model results by capturing the complete lineage.

  • Managing and visualizing the relationships between different entities in the ML pipeline (e.g., datasets, models, experiments).

FAQ from MLC Bakery

How do I set up the database?

Configure the DATABASE_URL environment variable in your .env file with the connection details for your PostgreSQL database.

How do I run database migrations?

Use the command uv run alembic upgrade heads to apply the latest database schema.

How do I access the API documentation?

The API documentation is available at http://localhost:8000/docs (Swagger UI) and http://localhost:8000/redoc (ReDoc) when the server is running locally.

How do I contribute to the project?

Create a new branch for your feature, make your changes, run tests, commit your changes, push to the branch, and submit a pull request.

How do I deploy the application using Docker Compose?

Configure the ADMIN_AUTH_TOKEN in a .env file, build and run the services using docker-compose up --build -d, and apply database migrations inside the running api container.