From c1b12247c393ff91fc48b782c9812f95ecfd23d9 Mon Sep 17 00:00:00 2001 From: Antoine Jeannot Date: Wed, 10 Jan 2024 09:51:08 +0100 Subject: [PATCH 1/4] docs: fix ci workflow --- .github/workflows/docs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 921cda6f..855a376c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -43,8 +43,8 @@ jobs: - name: Push Coverage Report run: | - git config user.name github-actions - git config user.email github-actions@github.com - git add coverage - git commit -m "add coverage report" - git push + git config user.name github-actions + git config user.email github-actions@github.com + git add coverage + git diff --staged --quiet || git commit -m "add coverage report" + git push From 7781cae127ac0104e5a211dcf5e0cb81ac05546d Mon Sep 17 00:00:00 2001 From: Antoine Jeannot Date: Mon, 15 Jan 2024 16:31:08 +0100 Subject: [PATCH 2/4] docs: update docs --- docs/index.md | 85 +++++++++++++++++++++++++++++++++++++++++---------- mkdocs.yml | 1 + 2 files changed, 70 insertions(+), 16 deletions(-) diff --git a/docs/index.md b/docs/index.md index 0c358a5d..cd986671 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,7 +1,7 @@

- - Logo - + + Logo +

modelkit

@@ -20,28 +20,81 @@

+`modelkit` is a minimalist yet powerful MLOps library for Python, built for people who want to deploy ML models to production. -`modelkit` is a Python framework meant to make your ML models robust, reusable and performant in all situations you need to use them. +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. -It is meant to bridge the gap between the different uses of your algorithms. With `modelkit` you can ensure that the same exact code will run in production, on your machine, or on data processing pipelines. +## Quickstart -## Features +`modelkit` provides a straightforward and consistent way to wrap your prediction code in a `Model` class: -`modelkit`'s key features are: +```python +from modelkit import Model -- **simple** `modelkit` is just a Python library, use pip to install it and you are done. -- **custom** `modelkit` is useful whenever you need to go beyond off-the-shelf models: custom processing, heuristics, business logic, different frameworks, etc. -- **framework agnostic** you bring your own framework to the table, and you can use whatever code or library you want. Similarly, `modelkit` is not opinionated about how you build or train your models. -- **organized** `modelkit` encourages you to 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** `modelkit` add minimal overhead to prediction calls. Model predictions can be batched for speed (you define the batching logic). -- **fast to code** Models only need to define their prediction logic and that's it. No cumbersome pre or postprocessing logic, branching options, etc... The boilerplate code is minimal and extensible. -- **fast to deploy** Models can be served in a single CLI call using [fastapi](https://fastapi.tiangolo.com/) +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](https://cornerstone-ondemand.github.io/modelkit/). -And more: +## 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/) -- **robust** `modelkit` helps you follow software development best practices: all configurations and artifacts are explicitly versioned and tested. +- **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)) + +### 🚧 Beta release + +`modelkit 0.1` and onwards will be shipped with `pydantic 2`, bringing significant performance improvements 🎉 ⚡ + +To try out the beta before it is stable: + +``` +pip install --pre modelkit +``` + +Also, you can refer to the [modelkit migration note](https://cornerstone-ondemand.github.io/modelkit/migration.md) + 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 +``` diff --git a/mkdocs.yml b/mkdocs.yml index ad5e29fd..c0c0ece5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,6 +4,7 @@ site_description: "Library for machine learning models" nav: - Home: "index.md" + - Migration note: "migration.md" - Developer guide: - "library/overview.md" - Models: From 2add9506153a10f54b5fd29b6daad6018b96da21 Mon Sep 17 00:00:00 2001 From: Antoine Jeannot Date: Mon, 15 Jan 2024 16:37:32 +0100 Subject: [PATCH 3/4] docs: update docs relative to the new stable release --- docs/migration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/migration.md b/docs/migration.md index 3f79d1d7..36878029 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -7,14 +7,14 @@ Modelkit 0.1 and onwards will be shipped with `pydantic 2`, which comes with __s Details on how to migrate to `pydantic 2` are available in the corresponding migration guide: https://docs.pydantic.dev/latest/migration/ ### Installation -To install and try out the `modelkit 0.1.0.bX` beta before its stable release: +To install the brand new stable release of modelkit: ``` -pip install --pre modelkit +pip install modelkit --upgrade ``` ### Known breaking changes -Some breaking changes are arising while upgrading to `pydantic 2` and the new `modelkit 0.1 beta`. Here is a brief, rather exhaustive, list of the encountered issues or dropped features. +Some breaking changes are arising while upgrading to `pydantic 2` and the new `modelkit 0.1`. Here is a brief, rather exhaustive, list of the encountered issues or dropped features. #### Drop: implicit pydantic model conversion @@ -57,7 +57,7 @@ Fixes: None, just prepare to have your inputs / outputs validated :) ### Development Workflows -The beta release, along with subsequent patches, will be pushed to the main branch. Prior to the stable release, tags will adopt the format `0.1.0.bX` +`modelkit 0.1` (and forward) changes will be pushed to the main branch. For projects that have not migrated, `modelkit 0.0` will continue to receive maintenance on the `v0.0-maintenance` branch. Releases on PyPI and manual tags will adhere to the usual process. From dd988a91eeee88b7fcbad5709abf95a7b42b174b Mon Sep 17 00:00:00 2001 From: Antoine Jeannot Date: Mon, 15 Jan 2024 16:41:51 +0100 Subject: [PATCH 4/4] =?UTF-8?q?Bump=20version:=200.1.0.b1=20=E2=86=92=200.?= =?UTF-8?q?1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ++---------- docs/index.md | 12 ++---------- modelkit/__init__.py | 2 +- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index cd986671..a10a83c0 100644 --- a/README.md +++ b/README.md @@ -71,17 +71,9 @@ 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)) -### 🚧 Beta release +`modelkit >= 0.1` is now be shipped with `pydantic 2`, bringing significant performance improvements 🎉 ⚡ -`modelkit 0.1` and onwards will be shipped with `pydantic 2`, bringing significant performance improvements 🎉 ⚡ - -To try out the beta before it is stable: - -``` -pip install --pre modelkit -``` - -Also, you can refer to the [modelkit migration note](https://cornerstone-ondemand.github.io/modelkit/migration.md) +You can refer to the [modelkit migration note](https://cornerstone-ondemand.github.io/modelkit/migration) to ease the migration process! ## Community diff --git a/docs/index.md b/docs/index.md index cd986671..a10a83c0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -71,17 +71,9 @@ 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)) -### 🚧 Beta release +`modelkit >= 0.1` is now be shipped with `pydantic 2`, bringing significant performance improvements 🎉 ⚡ -`modelkit 0.1` and onwards will be shipped with `pydantic 2`, bringing significant performance improvements 🎉 ⚡ - -To try out the beta before it is stable: - -``` -pip install --pre modelkit -``` - -Also, you can refer to the [modelkit migration note](https://cornerstone-ondemand.github.io/modelkit/migration.md) +You can refer to the [modelkit migration note](https://cornerstone-ondemand.github.io/modelkit/migration) to ease the migration process! ## Community diff --git a/modelkit/__init__.py b/modelkit/__init__.py index 79aa9175..3b2331ba 100644 --- a/modelkit/__init__.py +++ b/modelkit/__init__.py @@ -8,4 +8,4 @@ warnings.simplefilter(action="ignore", category=FutureWarning) -__version__ = "0.1.0.b1" +__version__ = "0.1.0"