Skip to content

Commit c7030ff

Browse files
committed
Update docs
1 parent 41ddd8a commit c7030ff

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Deploy machine learning models in production
22

3-
Cortex is an open source platform that takes machine learning models—trained with nearly any framework—and turns them into production web APIs in one command. <br>
3+
Cortex is an open source platform for deploying machine learning models—trained with nearly any framework—as production web services.
4+
5+
<br>
46

57
<!-- Delete on release branches -->
68
<!-- CORTEX_VERSION_README_MINOR -->
@@ -19,6 +21,8 @@ Cortex is an open source platform that takes machine learning models—trained w
1921

2022
- **CPU / GPU support:** Cortex can run inference on CPU or GPU infrastructure.
2123

24+
- **Spot instances:** Cortex supports EC2 spot instances.
25+
2226
- **Rolling updates:** Cortex updates deployed APIs without any downtime.
2327

2428
- **Log streaming:** Cortex streams logs from deployed models to your CLI.
@@ -31,12 +35,12 @@ Cortex is an open source platform that takes machine learning models—trained w
3135

3236
## Usage
3337

34-
### Define your API
38+
### Implement your predictor
3539

3640
```python
3741
# predictor.py
3842

39-
model = download_my_model()
43+
model = download_model()
4044

4145
def predict(sample, metadata):
4246
return model.predict(sample["text"])
@@ -58,6 +62,7 @@ def predict(sample, metadata):
5862
model_type: classification
5963
compute:
6064
gpu: 1
65+
mem: 4G
6166
```
6267
6368
### Deploy to AWS
@@ -73,7 +78,7 @@ creating classifier (http://***.amazonaws.com/sentiment/classifier)
7378
```bash
7479
$ curl http://***.amazonaws.com/sentiment/classifier \
7580
-X POST -H "Content-Type: application/json" \
76-
-d '{"text": "the movie was great!"}'
81+
-d '{"text": "the movie was amazing!"}'
7782

7883
positive
7984
```
@@ -84,7 +89,7 @@ positive
8489
$ cortex get classifier --watch
8590

8691
status up-to-date available requested last update avg latency
87-
live 1 1 1 8s 123ms
92+
live 1 1 1 8s 24ms
8893

8994
class count
9095
positive 8
@@ -95,7 +100,7 @@ negative 4
95100

96101
## How it works
97102

98-
The CLI sends configuration and code to the cluster every time you run `cortex deploy`. Each model is loaded into a Docker container, along with any Python packages and request handling code. The model is exposed as a web service using Elastic Load Balancing (ELB), Flask, TensorFlow Serving, and ONNX Runtime. The containers are orchestrated on Elastic Kubernetes Service (EKS) while logs and metrics are streamed to CloudWatch.
103+
The CLI sends configuration and code to the cluster every time you run `cortex deploy`. Each model is loaded into a Docker container, along with any Python packages and request handling code. The model is exposed as a web service using Elastic Load Balancing (ELB), TensorFlow Serving, and ONNX Runtime. The containers are orchestrated on Elastic Kubernetes Service (EKS) while logs and metrics are streamed to CloudWatch.
99104

100105
<br>
101106

@@ -105,4 +110,5 @@ The CLI sends configuration and code to the cluster every time you run `cortex d
105110
- [Sentiment analysis](https://github.com/cortexlabs/cortex/tree/0.10/examples/tensorflow/sentiment-analysis) in TensorFlow with BERT
106111
- [Image classification](https://github.com/cortexlabs/cortex/tree/0.10/examples/tensorflow/image-classifier) in TensorFlow with Inception
107112
- [Text generation](https://github.com/cortexlabs/cortex/tree/0.10/examples/pytorch/text-generator) in PyTorch with DistilGPT2
108-
- [Iris classification](https://github.com/cortexlabs/cortex/tree/0.10/examples/xgboost/iris-classifier) in XGBoost / ONNX
113+
- [Reading comprehension](https://github.com/cortexlabs/cortex/tree/0.10/examples/pytorch/text-generator) in PyTorch with ELMo-BiDAF
114+
- [Iris classification](https://github.com/cortexlabs/cortex/tree/0.10/examples/sklearn/iris-classifier) in scikit-learn

docs/cluster/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Note: This will create resources in your AWS account which aren't included in th
2929
git clone -b master https://github.com/cortexlabs/cortex.git
3030

3131
# Navigate to the iris classifier example
32-
cd cortex/examples/tensorflow/iris-classifier
32+
cd cortex/examples/sklearn/iris-classifier
3333

3434
# Deploy the model to the cluster
3535
cortex deploy

examples/sklearn/iris-classifier/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $ python3 trainer.py
4848

4949
<br>
5050

51-
## Define a predictor
51+
## Implement a predictor
5252

5353
1. Create another Python file `predictor.py`.
5454
2. Add code to load and initialize your pickled model.
@@ -100,7 +100,7 @@ You can skip dependencies that are [pre-installed](../../../docs/deployments/pre
100100

101101
<br>
102102

103-
## Define a deployment
103+
## Configure a deployment
104104

105105
Create a `cortex.yaml` file and add the configuration below. A `deployment` specifies a set of resources that are deployed together. An `api` provides a runtime for inference and makes our `predictor.py` implementation available as a web service that can serve real-time predictions:
106106

@@ -158,7 +158,7 @@ $ curl http://***.amazonaws.com/iris/classifier \
158158

159159
<br>
160160

161-
## Add prediction tracking
161+
## Configure prediction tracking
162162

163163
Add a `tracker` to your `cortex.yaml` and specify that this is a classification model:
164164

0 commit comments

Comments
 (0)