Package: chariots
chariotschariots aims to be a complete framework to build and deploy versioned machine learning pipelines.Documentation:https://chariots.readthedocs.io.Getting Started: 30 seconds to Chariots:You can check thechariots docutemtationfor a complete tutorial on getting started with
chariots, but here are the essentials:you can create operations to execute steps in your pipeline:>>> from chariots.sklearn import SKUnsupervisedOp, SKSupervisedOp
>>> from chariots.versioning import VersionType, VersionedFieldDict, VersionedField
>>> from sklearn.decomposition import PCA
>>> from sklearn.linear_model import LogisticRegression
...
...
>>> class PCAOp(SKUnsupervisedOp):
...     training_update_version = VersionType.MAJOR
...     model_parameters = VersionedFieldDict(VersionType.MAJOR, {"n_components": 2})
...     model_class = VersionedField(PCA, VersionType.MAJOR)
...
>>> class LogisticOp(SKSupervisedOp):
...     training_update_version = VersionType.PATCH
...     model_class = LogisticRegressionOnce your ops are created, you can create your various training and prediction pipelines:>>> from chariots import Pipeline, MLMode
>>> from chariots.nodes import Node
...
...
>>> train = Pipeline([
...     Node(IrisFullDataSet(), output_nodes=["x", "y"]),
...     Node(PCAOp(MLMode.FIT_PREDICT), input_nodes=["x"], output_nodes="x_transformed"),
...     Node(LogisticOp(MLMode.FIT), input_nodes=["x_transformed", "y"])
... ], 'train')
...
>>> pred = Pipeline([
...     Node(PCAOp(MLMode.PREDICT), input_nodes=["__pipeline_input__"], output_nodes="x_transformed"),
...     Node(LogisticOp(MLMode.PREDICT), input_nodes=["x_transformed"], output_nodes=['__pipeline_output__'])
... ], 'pred')Once all your pipelines have been created, deploying them is as easy as creating a creating aChariotsobject:>>> from chariots import Chariots
...
...
>>> app = Chariots([train, pred], app_path, import_name='iris_app')TheChariotsclass inherits from theFlaskclass so you can deploy this the same way you would anyflask applicationOnce this the server is started, you can use the chariots client to query your machine learning micro-service from
python:>>> from chariots import Client
...
...
>>> client = Client()with this client we will betraining the modelssaving them and reloading the prediction pipeline (so that it uses the latest/trained version of our models)query some prediction>>> client.call_pipeline(train)
>>> client.save_pipeline(train)
>>> client.load_pipeline(pred)
>>> client.call_pipeline(pred, [[1, 2, 3, 4]])
[1]Featuresversionable individual opeasy pipeline buildingeasy pipelines deploymentML utils (implementation of ops for most popular ML libraries with adequateVersionedfield) for sklearn and keras at firstA CookieCutter template to properly structure your Chariots projectComming SoonSome key features of Chariot are still in development and should be coming soon:Cloud integration (integration with cloud services to fetch and load models from)Graphql API to store and load information on different ops and pipelines (performance monitoring, …)ABTestingCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.audreyr/cookiecutter-pypackage’s project is also the basis of the Chariiots project templateHistory0.1.0 (2019-06-15)First release on PyPI.0.2.0 (2019-06-15)sci-kit learn and keras integrationmultiple outputs per nodesproject templatetutorials