Skip to content

Commit 95d77e6

Browse files
authored
Merge branch 'master' into rolling-update
2 parents cf91eee + e41e38d commit 95d77e6

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ Cortex is an open source platform for deploying machine learning models as produ
1515

1616
## Key features
1717

18-
* **Multi framework:** Cortex supports TensorFlow, PyTorch, scikit-learn, XGBoost, and more.
19-
* **Autoscaling:** Cortex automatically scales APIs to handle production workloads.
20-
* **CPU / GPU support:** Cortex can run inference on CPU or GPU infrastructure.
21-
* **Spot instances:** Cortex supports EC2 spot instances.
22-
* **Rolling updates:** Cortex updates deployed APIs without any downtime.
23-
* **Log streaming:** Cortex streams logs from deployed models to your CLI.
24-
* **Prediction monitoring:** Cortex monitors network metrics and tracks predictions.
25-
* **Minimal configuration:** Cortex deployments are defined in a single `cortex.yaml` file.
18+
* **Multi framework:** deploy TensorFlow, PyTorch, scikit-learn, and other models.
19+
* **Autoscaling:** automatically scale APIs to handle production workloads.
20+
* **CPU / GPU support:** run inference on CPU or GPU instances.
21+
* **Spot instances:** save money with EC2 spot instances.
22+
* **Rolling updates:** update deployed APIs with no downtime.
23+
* **Log streaming:** stream logs from deployed models to your CLI.
24+
* **Prediction monitoring:** monitor API performance and track predictions.
2625

2726
<br>
2827

@@ -135,6 +134,8 @@ Cortex is an open source alternative to serving models with SageMaker or buildin
135134

136135
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.
137136

137+
**Note:** Cortex manages its own Kubernetes cluster so that end-to-end functionality like request-based autoscaling, GPU support, and spot instance management can work out of the box without any DevOps work.
138+
138139
<br>
139140

140141
## Examples of Cortex deployments

examples/tensorflow/license-plate-reader/predictor_crnn.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ def predict(self, payload):
3131
except ValueError:
3232
# exception can occur when the images are too small
3333
prediction_groups = []
34+
35+
image_list = []
3436
for img_predictions in prediction_groups:
37+
boxes_per_image = []
3538
for predictions in img_predictions:
36-
predictions = tuple([predictions[0], predictions[1].tolist()])
37-
lps = {"license-plates": prediction_groups}
39+
boxes_per_image.append([predictions[0], predictions[1].tolist()])
40+
image_list.append(boxes_per_image)
41+
42+
lps = {"license-plates": image_list}
3843

3944
return lps

examples/tensorflow/license-plate-reader/predictor_yolo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def predict(self, payload):
4040
# package the response
4141
response = {"boxes": []}
4242
for box in boxes:
43-
response["boxes"].append([box.xmin, box.ymin, box.xmax, box.ymax, box.c, box.classes])
43+
response["boxes"].append(
44+
[box.xmin, box.ymin, box.xmax, box.ymax, float(box.c), box.classes.tolist()]
45+
)
4446

4547
return response

0 commit comments

Comments
 (0)