Skip to main content

Minimalistic MLOps library for python

Project description

Logo

modelkit

Python framework for production ML systems.


modelkit is a minimalist yet powerful MLOps library for Python, built for people who want to deploy ML models to production.

It packs several features which make your go-to-production journey a breeze, and ensures that the same exact code will run in production, on your machine, or on data processing pipelines.

Quickstart

modelkit provides a straightforward and consistent way to wrap your prediction code in a Model class:

from modelkit import Model

class MyModel(Model):
    def _predict(self, item):
        # This is where your prediction logic goes
        ...
        return result

Be sure to check out our tutorials in the documentation.

Features

Wrapping your prediction code in modelkit instantly gives acces to all features:

  • fast Model predictions can be batched for speed (you define the batching logic) with minimal overhead.
  • composable Models can depend on other models, and evaluate them however you need to
  • extensible Models can rely on arbitrary supporting configurations files called assets hosted on local or cloud object stores
  • type-safe Models' inputs and outputs can be validated by pydantic, you get type annotations for your predictions and can catch errors with static type analysis tools during development.
  • async Models support async and sync prediction functions. modelkit supports calling async code from sync code so you don't have to suffer from partially async code.
  • testable Models carry their own unit test cases, and unit testing fixtures are available for pytest
  • fast to deploy Models can be served in a single CLI call using fastapi

In addition, you will find that modelkit is:

  • simple Use pip to install modelkit, it is just a Python library.
  • robust Follow software development best practices: version and test all your configurations and artifacts.
  • customizable Go beyond off-the-shelf models: custom processing, heuristics, business logic, different frameworks, etc.
  • framework agnostic Bring your own framework to the table, and use whatever code or library you want. modelkit is not opinionated about how you build or train your models.
  • organized Version and share you ML library and artifacts with others, as a Python package or as a service. Let others use and evaluate your models!
  • fast to code Just write the prediction logic and that's it. No cumbersome pre or postprocessing logic, branching options, etc... The boilerplate code is minimal and sensible.

Installation

Install the latest stable release with pip:

pip install modelkit

Optional dependencies are available for remote storage providers (see documentation)

modelkit >= 0.1 is now be shipped with pydantic 2, bringing significant performance improvements 🎉 ⚡

You can refer to the modelkit migration note to ease the migration process!

Community

Join our community on Discord to get support and leave feedback

Local install

Contributors, if you want to install and test locally:

# install
make setup

# lint & test
make tests

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 Distribution

If you're not sure about the file name format, learn more about wheel file names.

modelkit-0.1.3-py3-none-any.whl (64.5 kB view details)

Uploaded Python 3

File details

Details for the file modelkit-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: modelkit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 64.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for modelkit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e47044392af6e3aaf4fcb8d956259405fe0fe4f72f9d4312d8f94eb4ae3d052c
MD5 ff6b8a3fe9dbd033d125176831d074b8
BLAKE2b-256 0e2896fe190e72cc5c7461b66360d3b9e063b0796c210d230455287b6a351cd3

See more details on using hashes here.

Supported by

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