Cortex: An open source platform
Created by Weaveworks, Cortex is an open source timeseries database and monitoring system for applications and microservices. Based on Prometheus, Cortex adds horizontal scaling and virtually indefinite data retention. if you are looking for a tool to deploy machine learning models as production web services, then ‘Cortex’ could be a good option to try. This open-source platform is an alternative to serving models with AWS SageMaker or creating your own model deployment platform over AWS services like Elastic Container Service (ECS), Elastic Kubernetes Service (EKS), and Elastic Compute Cloud (EC2) and even open-source projects like Docker, Kubernetes, and TensorFlow.
Key Features
- Multi framework: Cortex supports multiple frameworks, including TensorFlow, PyTorch, scikit-learn, XGBoost, and more.
- Autoscaling: Cortex automatically does load balancing for API’s to handle production workloads.
- Infrastructure: Cortex can run inference both on CPU or GPU infrastructure.
- Rolling updates: Cortex updates APIs post-deployment without any downtime.
Examples of Cortex deployments
Sentiment analysis: Deploy a BERT model for sentiment analysis using Cortex Image classification: Deploy an Inception model to classify images using Cortex
Install
Prerequisites
1.Docker 2.AWS credentials #install the CLI on your machine bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.11/get-cli.sh)" #provision infrastructure on AWS and spin up a cluster cortex cluster up
Features
Horizontally Scalable, Open Source
Built on Prometheus, Cortex is an open source project that adds horizontal scalability. While Prometheus can scale up to 1 million samples/sec on a single machine, with Cortex horizontal scalability is practically limitless.
Virtually Infinite Data Retention
Prometheus' local storage model limits the possible data retention and durability to that of a single machine. Cortex' use of cloud-native storage such as Amazon DynamoDB and S3 allow for virtually infinite data retention.
Prometheus Compatible
Cortex offers a Prometheus-compatible APIs and query language - PromQL. PromQL is a concise and expressive query language, allowing for powerful insight into your application's behavior. Due to Prometheus’ dimensional data model, you can slice, dice and drill down quickly into problems - enabling you to rapidly analyse resolve issues.
Designed for Microservices and Containers
In a constantly changing environment, you need alternative approaches to monitoring individual VMs or servers. Prometheus' service-discovery driven pull-based metrics system was designed for the dynamic nature of microservices. It lets you easily monitor your whole environment no matter how many moving parts.
Hundreds of Integrations
Instrument your application to create custom metrics using standard Prometheus client libraries, or take advantage of the extensive collection of Prometheus Exporters that collect data from existing applications like MySQL, Redis, Java, ElasticSearch and many more.
Horizontally scalable, cloud-native Prometheus
Comparing Cortex to Prometheus, it is seen to offer the same powerful query language, data model and configurable alerts as Prometheus, but we added horizontal scalability and cloud-native storage for virtually infinite data retention.
Cortex was created by Weaveworks. Since September 2018, it is now a CNCF project with "incubating" status.