Skip to main content

Deployment of a Scikit-Learn model and it's column transformations with a single endpoint.

Project description

sk-serve

deploy on pypi PyPI Version

Deployment of a Scikit-Learn model and it's column transformations with a single endpoint. Only a traditional Scikit-Learn model is needed and a ColumnTransformer object (sklearn.compose) to deploy your model. Validation of input data is also supported with pydantic.

Installation

The package exists on PyPI (with a different name though) so you can install it directly to your environment by running the command

pip install simple-serve

Dependencies

  • pydantic
  • fastapi
  • pandas
  • scikit-learn

Additional packages for development:

  • pyright
  • pre-commit

Development

If you want to contribute you fork the repository and clone it on your machine

git clone https://github.com/alexliap/sk_serve.git

And after you create you environment (either venv or conda) and activate it then run this command

pip install -e ".[dev]"

That way not only the required dependencies are installed but also the development ones.

Also this makes it so that when you import the code to test it, you can do it like any other module but containing the changes you made locally.

Before you decide to commit, run the following command to reformat code in order to be in the acceptable style.

pre-commit install
pre-commit run --all-files

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_serve-1.0.0a0.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

simple_serve-1.0.0a0-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

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