Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Cornerstone-OnDemand/modelkit
Toolkit for developing and maintaining ML models
https://github.com/Cornerstone-OnDemand/modelkit
fastapi machine-learning mlops production python
Last synced: about 2 months ago
JSON representation
Toolkit for developing and maintaining ML models
- Host: GitHub
- URL: https://github.com/Cornerstone-OnDemand/modelkit
- Owner: Cornerstone-OnDemand
- License: mit
- Created: 2021-05-14T12:10:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-06T14:34:14.000Z (7 months ago)
- Last Synced: 2024-11-06T05:04:59.121Z (about 2 months ago)
- Topics: fastapi, machine-learning, mlops, production, python
- Language: Python
- Homepage: http://cornerstone-ondemand.github.io/modelkit/
- Size: 1.79 MB
- Stars: 155
- Watchers: 8
- Forks: 17
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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:
```python
from modelkit import Modelclass 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](https://cornerstone-ondemand.github.io/modelkit/).
## 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](https://pydantic-docs.helpmanual.io/), 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](https://docs.pytest.org/en/6.2.x/)
- **fast to deploy** Models can be served in a single CLI call using [fastapi](https://fastapi.tiangolo.com/)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](https://cornerstone-ondemand.github.io/modelkit/assets/storage_provider/#using-different-providers))
`modelkit >= 0.1` is now be shipped with `pydantic 2`, bringing significant performance improvements 🎉 ⚡
You can refer to the [modelkit migration note](https://cornerstone-ondemand.github.io/modelkit/migration)
to ease the migration process!## Community
Join our [community](https://discord.gg/ayj5wdAArV) 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
```