Metadata-Version: 2.1
Name: ebonite
Version: 0.3.5
Summary: Machine Learning Lifecycle Framework
Home-page: https://github.com/zyfra/ebonite
Author: Mikhail Sveshnikov
Author-email: mike0sv@gmail.com
License: Apache-2.0
Project-URL: Changelog, https://github.com/zyfra/ebonite/blob/master/CHANGELOG.rst
Project-URL: Issue Tracker, https://github.com/zyfra/ebonite/issues
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Requires-Dist: docker (==4.1.0)
Requires-Dist: pyyaml (==5.1.2)
Requires-Dist: requests (==2.22.0)
Requires-Dist: dill (==0.3.1.1)
Requires-Dist: GitPython (==3.0.3)
Requires-Dist: isort (==4.3.21)
Requires-Dist: pyjackson (==0.0.23)
Requires-Dist: everett (==1.0.2)
Requires-Dist: Jinja2 (==2.10.1)
Provides-Extra: testing
Requires-Dist: pandas (==0.25.1) ; extra == 'testing'
Requires-Dist: numpy (==1.17.3) ; extra == 'testing'
Requires-Dist: scipy (==1.3.3) ; extra == 'testing'
Requires-Dist: scikit-learn (==0.22) ; extra == 'testing'
Requires-Dist: sqlalchemy (==1.3.10) ; extra == 'testing'
Requires-Dist: tensorflow (==1.15.2) ; extra == 'testing'
Requires-Dist: catboost (==0.19.1) ; extra == 'testing'
Requires-Dist: flasgger (==0.9.3) ; extra == 'testing'
Requires-Dist: boto3 (==1.10.28) ; extra == 'testing'
Requires-Dist: imageio (==2.6.1) ; extra == 'testing'
Requires-Dist: responses (==0.10.6) ; extra == 'testing'
Requires-Dist: psutil (==5.6.3) ; extra == 'testing'
Requires-Dist: testcontainers (==2.5) ; extra == 'testing'
Requires-Dist: pytest (==5.2.2) ; extra == 'testing'
Requires-Dist: xgboost (==0.90) ; extra == 'testing'
Requires-Dist: lightgbm (==2.3.0) ; extra == 'testing'
Requires-Dist: torch (==1.3.1+cpu) ; (sys_platform != "darwin") and extra == 'testing'
Requires-Dist: torchvision (==0.4.2+cpu) ; (sys_platform != "darwin") and extra == 'testing'
Requires-Dist: torch (==1.3.1) ; (sys_platform == "darwin") and extra == 'testing'
Requires-Dist: torchvision (==0.4.2) ; (sys_platform == "darwin") and extra == 'testing'

.. image:: ebonite.jpg



Ebonite is a machine learning lifecycle framework.
It allows you to persist your models and reproduce them (as services or in general).

Installation
============

::

    pip install ebonite

Quickstart
=============

Before starting with Ebonite prepare your model.
This could be a model from your favorite library (list of supported libraries is presented above) or
a custom Python function working with typical machine learning data structures.

.. code-block:: python

  import numpy as np
  def clf(data):
    return (np.sum(a, axis=-1) > 1).astype(np.int32)

Moreover, your custom function could wrap a model from some library.
This gives you flexibility to use not only pure ML models but rule-based ones (e.g., as a service stub at project start)
and hybrid (ML with pre/postprocessing) ones which are often applied to solve real world problems.

When a model is prepared you should create a Ebonite client.

.. code-block:: python

  from ebonite import Ebonite
  ebnt = Ebonite.local()

Then create a task and push your model object with some sample data.
Sample data is required for Ebonite to determine structure of inputs and outputs for your model.

.. code-block:: python

   task = ebnt.get_or_create_task('my_project', 'my_task')
   model = task.create_and_push_model(clf, test_x, 'my_clf')

You are awesome! Now your model is safely persisted in a repository.

Later on in other Python process you can load your model from this repo and do some wonderful stuff with it,
e.g., create a Docker image named `my_service` with an HTTP service wrapping your model.

.. code-block:: python

  from ebonite import Ebonite
  ebnt = Ebonite.local()
  task = ebnt.get_or_create_task('my_project', 'my_task')
  model = client.get_model('my_clf', task)
  client.build_service('my_service', model)

Check out examples (in `examples` directory) and documentation to learn more.

Documentation
=============
... is available `here <https://ebonite.readthedocs.io/en/latest/>`_

Supported libraries and repositories
====================================

* Models

  * your arbitrary Python function

  * scikit-learn

  * TensorFlow < 2

  * XGBoost

  * LightGBM

  * PyTorch

  * CatBoost

* Model input / output data

  * NumPy

  * pandas

  * images

* Model repositories

  * in-memory

  * local filesystem

  * SQLAlchemy

  * Amazon S3

* Serving

  * Flask



Contributing
============

Read `this <https://github.com/zyfra/ebonite/blob/master/CONTRIBUTING.rst>`_
Changelog
=========

Current release candidate
-------------------------

0.3.5 (2020-01-31)
------------------

* Fixed critical bug with wrapper_meta

0.3.4 (2020-01-31)
------------------

* Fixed bug with deleting models from tasks
* Support working with model meta without requiring installation of all model dependencies
* Added region argument for s3 repository
* Support for delete_model in Ebonite client
* Support for force flag in delete_model which deletes model even if artifacts could not be deleted

0.3.3 (2020-01-10)
------------------

* Eliminated tensorflow warnings. Added more tests for providers/loaders. Fixed bugs in multi-model provider/builder.
* Improved documentation
* Eliminate useless "which docker" check which fails on Windows hosts
* Perform redirect from / to Swagger API docs in Flask server
* Support for predict_proba method in ML model
* Do not fix first dimension size for numpy arrays and torch tensors
* Support for Pytorch JIT (TorchScript) models
* Bump tensorflow from 1.14.0 to 1.15.0
* Added more tests

0.3.2 (2019-12-04)
------------------

* Multi-model interface bug fixes

0.3.1 (2019-12-04)
------------------

* Minor bug fixes

0.3.0 (2019-11-27)
------------------

* Added support for LightGBM models
* Added support for XGBoost models
* Added support for PyTorch models
* Added support for CatBoost models
* Added uwsgi server for flask containers

0.2.1 (2019-11-19)
------------------

* Minor bug fixes

0.2.0 (2019-11-14)
------------------

* First release on PyPI.


