{ "info": { "author": "Quentin Caudron", "author_email": "quentincaudron@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Build Tools" ], "description": "# ShipIt\n\nEasily deploy your machine learning models to an API in the cloud.\n\n## Quickstart\n\n1. Install and configure awscli\n1. Install terraform\n1. `pip install shipit`\n1. `shipit init`\n1. Edit the newly created `shipit.yml` See [configuration](#configuration)\n1. `shipit deploy`\n\nYou will get an output that tells you the version and what the endpoint is.\n\n```\nProject : demo\nEndpoint : production-alb-demo-553835794.us-west-2.elb.amazonaws.com\nVersion : 2\n```\n\n## How it Works\nShipit wraps tools like docker, awscli, and terraform to make it easy to deploy production ready web APIs for your machine learning models. First a docker image is built based on the configurat\n\n\n## Running Locally\n\nYou can spin up your container locally like this:\n\n```\nshipit build -t yourtagname\ndocker run -p 5000:80 -it yourtagname\n```\n\nYou now have your models being served from a web API. Visit `localhost:5000/` to see the list of available models.\n\n## Commands\n\nshipit deploy -t [yourtag] --verbosity 1\n: Build and deploy the shipit project. All arguments are optional.\n\nshipit destroy\n: Use terraform to destroy \n\nshipit build -t [yourtag] --verbosity 1\n: Build the docker image and tag it. All arguments are optional.\n\n## Usage\n\nGetting predictions requires sending a `POST` to the relevant model's predict endpoint:\n\n```\nhttp://[your-endpoint]/predict/[model-name]\n```\n\nThe payload should be a JSON serialized array or 2d array (for multiple predictions) to the provided model's endpoint. For example, a model that takes three features would look like this:\n\n```\n[33, 4, 10]\n```\n\nIn the case of doing multiple predictions, pass that in as a 2d array.\n\n```\n[\n [33, 4, 10],\n [32, 1, 5]\n]\n```\n\nHere's an example using cURL.\n\n```\ncurl -d '[[5, 1, 6], [1, 2, 3]]' -H \"Content-Type: application/json\" -X POST http://[your-endpoint]:5000/predict/[modelname]\n```\n\nThe response will always be a 2d array, so if you send one data point expect a list back with only one row.\n\n## Configuration \n\nThe config file `shipit.yml` for your project is broken down into two major sections. \n\n### meta\n\nproject_name\n: A unique project name, used to namespace the resources created for your project.\n\nrequirements\n: Path to a requirements.txt file to install dependencies for your models\n\nprovider\n: For now this is always assumed to be `aws`\n\naws_profile\n: Name of the profile from your awscli credentials. \n\naws_region\n: Which aws region to launch your service in.\n\n### models\n\nThis section can contain one or more models you want to include in this API service. See `example/shipit.yml` as a reference.\n\npath\n: The relative path of the pickled model file e.g. `models/my_model.pkl`\n\nvariety\n: One of `[\"sklearn\", \"keras\"]`. Eventually we will add more model types.\n\npreprocess\n: (optional) A python import dot path to a preprocess function. This function can perform manipulations of the API input before sending it to your model.\n\npostprocess\n: (optional) A python import dot path to a postprocess function. This function can perform manipulations of the model's prediction output before returning it to the user.\n\n\n## Formatting model data\n\nFirst, ensure your features is a `(n_samples, n_features)`-shaped numpy array ( in standard `sklearn` form ). Turn this into a list ( so that we can JSON-serialise it ). \n\n## Saving models\n\nModels from `scikit-learn` should be saved with `joblib`. Models from `keras` should be saved with `model.save()`. See `example/save_model_example.py`.\n\n## To Do\n- Deploy to Private VPN\n- Route53 / private / public DNS\n- Build an \"export\" feature for customization of Docker / terraform setup.\n- Support XGBoost models\n- Figure out why sklearn.linear_model.LinearRegression can't be pickled\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/qCaudron/shipit/", "keywords": "machine learning scikit keras docker", "license": "", "maintainer": "", "maintainer_email": "", "name": "shipit-ml", "package_url": "https://pypi.org/project/shipit-ml/", "platform": "", "project_url": "https://pypi.org/project/shipit-ml/", "project_urls": { "Homepage": "http://github.com/qCaudron/shipit/", "Source": "http://github.com/qCaudron/shipit/" }, "release_url": "https://pypi.org/project/shipit-ml/0.6.0/", "requires_dist": [ "docker (>=3)", "numpy (>=1)", "awscli", "pyyaml (<3.15,>=3.13)", "delegator.py (>=0.1.1)" ], "requires_python": "!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "summary": "Package machine learning models for the web", "version": "0.6.0" }, "last_serial": 5269055, "releases": { "0.6.0": [ { "comment_text": "", "digests": { "md5": "54d072e155642209959810dce3c6149b", "sha256": "7886f20f968c15921cda6034d0197e1800139810c615f78d12f16c4c44707bf3" }, "downloads": -1, "filename": "shipit_ml-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "54d072e155642209959810dce3c6149b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 10769, "upload_time": "2019-05-14T19:35:41", "url": "https://files.pythonhosted.org/packages/44/97/b4490ff9e2abcfeef8fc330a8f5a64915d15b6b1ae761903741986be4d22/shipit_ml-0.6.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "212f76e05df002ab5efe148238584a1a", "sha256": "2a0b616edfcd131affbe7086149db6d050106c4ed4cf5911aee0d3620569dbb3" }, "downloads": -1, "filename": "shipit_ml-0.6.0.tar.gz", "has_sig": false, "md5_digest": "212f76e05df002ab5efe148238584a1a", "packagetype": "sdist", "python_version": "source", "requires_python": "!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 8128, "upload_time": "2019-05-14T19:35:43", "url": "https://files.pythonhosted.org/packages/59/6a/a5679efcfeea026669f156db2b97d3df5f5901fbbb203d8e4a43dfe96c42/shipit_ml-0.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "54d072e155642209959810dce3c6149b", "sha256": "7886f20f968c15921cda6034d0197e1800139810c615f78d12f16c4c44707bf3" }, "downloads": -1, "filename": "shipit_ml-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "54d072e155642209959810dce3c6149b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 10769, "upload_time": "2019-05-14T19:35:41", "url": "https://files.pythonhosted.org/packages/44/97/b4490ff9e2abcfeef8fc330a8f5a64915d15b6b1ae761903741986be4d22/shipit_ml-0.6.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "212f76e05df002ab5efe148238584a1a", "sha256": "2a0b616edfcd131affbe7086149db6d050106c4ed4cf5911aee0d3620569dbb3" }, "downloads": -1, "filename": "shipit_ml-0.6.0.tar.gz", "has_sig": false, "md5_digest": "212f76e05df002ab5efe148238584a1a", "packagetype": "sdist", "python_version": "source", "requires_python": "!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 8128, "upload_time": "2019-05-14T19:35:43", "url": "https://files.pythonhosted.org/packages/59/6a/a5679efcfeea026669f156db2b97d3df5f5901fbbb203d8e4a43dfe96c42/shipit_ml-0.6.0.tar.gz" } ] }