Skip to content

Commit

Permalink
Update version to 0.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalbollu committed Aug 25, 2020
1 parent 7d45c8e commit 990a161
Show file tree
Hide file tree
Showing 33 changed files with 97 additions and 104 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
<!-- Delete on release branches -->
<img src='https://s3-us-west-2.amazonaws.com/cortex-public/logo.png' height='42'>

<br>

# Build machine learning APIs

Cortex makes deploying, scaling, and managing machine learning systems in production simple. We believe that developers in any organization should be able to add natural language processing, computer vision, and other machine learning capabilities to their applications without having to worry about infrastructure.

<!-- Delete on release branches -->
<!-- CORTEX_VERSION_README_MINOR -->
[install](https://docs.cortex.dev/install)[documentation](https://docs.cortex.dev)[examples](https://github.com/cortexlabs/cortex/tree/0.18/examples)[we're hiring](https://angel.co/cortex-labs-inc/jobs)[chat with us](https://gitter.im/cortexlabs/cortex)

<br>

# Key features

### Deploy

* Run Cortex locally or as a production cluster on your AWS account.
* Deploy TensorFlow, PyTorch, scikit-learn, and other models as web APIs.
* Deploy TensorFlow, PyTorch, scikit-learn, and other models as realtime APIs or batch APIs.
* Define preprocessing and postprocessing steps in Python.

### Manage

* Update APIs with no downtime.
* Stream logs from your APIs to your CLI.
* Monitor API performance and track predictions.
* Run A/B tests.

### Scale

Expand All @@ -51,11 +41,12 @@ Here's how to deploy GPT-2 as a scalable text generation API:

<!-- CORTEX_VERSION_README_MINOR -->
```bash
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.18/get-cli.sh)"
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.19/get-cli.sh)"
```

<!-- CORTEX_VERSION_README_MINOR -->
See our [installation guide](https://docs.cortex.dev/install), then deploy one of our [examples](https://github.com/cortexlabs/cortex/tree/0.18/examples) or bring your own models to build [custom APIs](https://docs.cortex.dev/guides/exporting).
See our [installation guide](https://docs.cortex.dev/install), then deploy one of our [examples](https://github.com/cortexlabs/cortex/tree/0.19/examples) or bring your own models to build [realtime APIs](https://docs.cortex.dev/deployments/realtime-api) and [batch APIs](https://docs.cortex.dev/deployments/batch-api).


### Learn more

Expand Down
2 changes: 1 addition & 1 deletion build/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)"

CORTEX_VERSION=master
CORTEX_VERSION=0.19.0

slim="false"
while [[ $# -gt 0 ]]; do
Expand Down
2 changes: 1 addition & 1 deletion build/cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)"

CORTEX_VERSION=master
CORTEX_VERSION=0.19.0

arg1=${1:-""}
upload="false"
Expand Down
2 changes: 1 addition & 1 deletion build/push-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

set -euo pipefail

CORTEX_VERSION=master
CORTEX_VERSION=0.19.0

slim="false"
while [[ $# -gt 0 ]]; do
Expand Down
42 changes: 21 additions & 21 deletions docs/cluster-management/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ instance_volume_type: gp2

# whether the subnets used for EC2 instances should be public or private (default: "public")
# if "public", instances will be assigned public IP addresses; if "private", instances won't have public IPs and a NAT gateway will be created to allow outgoing network requests
# see https://docs.cortex.dev/v/master/miscellaneous/security#private-cluster for more information
# see https://docs.cortex.dev/v/0.19/miscellaneous/security#private-cluster for more information
subnet_visibility: public # must be "public" or "private"

# whether to include a NAT gateway with the cluster (a NAT gateway is necessary when using private subnets)
Expand All @@ -56,12 +56,12 @@ nat_gateway: none # must be "none", "single", or "highly_available" (highly_ava

# whether the API load balancer should be internet-facing or internal (default: "internet-facing")
# note: if using "internal", APIs will still be accessible via the public API Gateway endpoint unless you also disable API Gateway in your API's configuration (if you do that, you must configure VPC Peering to connect to your APIs)
# see https://docs.cortex.dev/v/master/miscellaneous/security#private-cluster for more information
# see https://docs.cortex.dev/v/0.19/miscellaneous/security#private-cluster for more information
api_load_balancer_scheme: internet-facing # must be "internet-facing" or "internal"

# whether the operator load balancer should be internet-facing or internal (default: "internet-facing")
# note: if using "internal", you must configure VPC Peering to connect your CLI to your cluster operator (https://docs.cortex.dev/v/master/guides/vpc-peering)
# see https://docs.cortex.dev/v/master/miscellaneous/security#private-cluster for more information
# note: if using "internal", you must configure VPC Peering to connect your CLI to your cluster operator (https://docs.cortex.dev/v/0.19/guides/vpc-peering)
# see https://docs.cortex.dev/v/0.19/miscellaneous/security#private-cluster for more information
operator_load_balancer_scheme: internet-facing # must be "internet-facing" or "internal"

# whether to disable API gateway cluster-wide
Expand All @@ -76,10 +76,10 @@ log_group: cortex
tags: # <string>: <string> map of key/value pairs

# whether to use spot instances in the cluster (default: false)
# see https://docs.cortex.dev/v/master/cluster-management/spot-instances for additional details on spot configuration
# see https://docs.cortex.dev/v/0.19/cluster-management/spot-instances for additional details on spot configuration
spot: false

# see https://docs.cortex.dev/v/master/guides/custom-domain for instructions on how to set up a custom domain
# see https://docs.cortex.dev/v/0.19/guides/custom-domain for instructions on how to set up a custom domain
ssl_certificate_arn:
```
Expand All @@ -90,19 +90,19 @@ The docker images used by the Cortex cluster can also be overridden, although th
<!-- CORTEX_VERSION_BRANCH_STABLE -->
```yaml
# docker image paths
image_operator: cortexlabs/operator:master
image_manager: cortexlabs/manager:master
image_downloader: cortexlabs/downloader:master
image_request_monitor: cortexlabs/request-monitor:master
image_cluster_autoscaler: cortexlabs/cluster-autoscaler:master
image_metrics_server: cortexlabs/metrics-server:master
image_inferentia: cortexlabs/inferentia:master
image_neuron_rtd: cortexlabs/neuron-rtd:master
image_nvidia: cortexlabs/nvidia:master
image_fluentd: cortexlabs/fluentd:master
image_statsd: cortexlabs/statsd:master
image_istio_proxy: cortexlabs/istio-proxy:master
image_istio_pilot: cortexlabs/istio-pilot:master
image_istio_citadel: cortexlabs/istio-citadel:master
image_istio_galley: cortexlabs/istio-galley:master
image_operator: cortexlabs/operator:0.19.0
image_manager: cortexlabs/manager:0.19.0
image_downloader: cortexlabs/downloader:0.19.0
image_request_monitor: cortexlabs/request-monitor:0.19.0
image_cluster_autoscaler: cortexlabs/cluster-autoscaler:0.19.0
image_metrics_server: cortexlabs/metrics-server:0.19.0
image_inferentia: cortexlabs/inferentia:0.19.0
image_neuron_rtd: cortexlabs/neuron-rtd:0.19.0
image_nvidia: cortexlabs/nvidia:0.19.0
image_fluentd: cortexlabs/fluentd:0.19.0
image_statsd: cortexlabs/statsd:0.19.0
image_istio_proxy: cortexlabs/istio-proxy:0.19.0
image_istio_pilot: cortexlabs/istio-pilot:0.19.0
image_istio_citadel: cortexlabs/istio-citadel:0.19.0
image_istio_galley: cortexlabs/istio-galley:0.19.0
```
6 changes: 3 additions & 3 deletions docs/cluster-management/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- CORTEX_VERSION_MINOR -->
```bash
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/master/get-cli.sh)"
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.19/get-cli.sh)"
```

You must have [Docker](https://docs.docker.com/install) installed to run Cortex locally or to create a cluster on AWS.
Expand All @@ -14,7 +14,7 @@ You must have [Docker](https://docs.docker.com/install) installed to run Cortex
<!-- CORTEX_VERSION_MINOR -->
```bash
# clone the Cortex repository
git clone -b master https://github.com/cortexlabs/cortex.git
git clone -b 0.19 https://github.com/cortexlabs/cortex.git

# navigate to the Pytorch text generator example
cd cortex/examples/pytorch/text-generator
Expand Down Expand Up @@ -60,6 +60,6 @@ You can now run the same commands shown above to deploy the text generator to AW

<!-- CORTEX_VERSION_MINOR -->
* Try the [tutorial](../../examples/pytorch/text-generator/README.md) to learn more about how to use Cortex.
* Deploy one of our [examples](https://github.com/cortexlabs/cortex/tree/master/examples).
* Deploy one of our [examples](https://github.com/cortexlabs/cortex/tree/0.19/examples).
* See our [exporting guide](../guides/exporting.md) for how to export your model to use in an API.
* See [uninstall](uninstall.md) if you'd like to spin down your cluster.
2 changes: 1 addition & 1 deletion docs/cluster-management/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cortex cluster configure
cortex cluster down

# update your CLI
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/master/get-cli.sh)"
bash -c "$(curl -sS https://raw.githubusercontent.com/cortexlabs/cortex/0.19/get-cli.sh)"

# confirm version
cortex version
Expand Down
2 changes: 1 addition & 1 deletion docs/deployments/batch-api/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ deleting my-api
<!-- CORTEX_VERSION_MINOR -->
* [Tutorial](../../../examples/batch/image-classifier/README.md) provides a step-by-step walkthrough of deploying an image classification batch API
* [CLI documentation](../../miscellaneous/cli.md) lists all CLI commands
* [Examples](https://github.com/cortexlabs/cortex/tree/master/examples/batch) demonstrate how to deploy models from common ML libraries
* [Examples](https://github.com/cortexlabs/cortex/tree/0.19/examples/batch) demonstrate how to deploy models from common ML libraries
16 changes: 8 additions & 8 deletions docs/deployments/batch-api/predictors.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ For proper separation of concerns, it is recommended to use the constructor's `c
### Examples

<!-- CORTEX_VERSION_MINOR -->
You can find an example of a BatchAPI using a PythonPredictor in [examples/batch/image-classifier](https://github.com/cortexlabs/cortex/tree/master/examples/batch/image-classifier).
You can find an example of a BatchAPI using a PythonPredictor in [examples/batch/image-classifier](https://github.com/cortexlabs/cortex/tree/0.19/examples/batch/image-classifier).

### Pre-installed packages

Expand Down Expand Up @@ -148,7 +148,7 @@ torchvision==0.4.2
```

<!-- CORTEX_VERSION_MINOR x3 -->
The pre-installed system packages are listed in [images/python-predictor-cpu/Dockerfile](https://github.com/cortexlabs/cortex/tree/master/images/python-predictor-cpu/Dockerfile) (for CPU), [images/python-predictor-gpu/Dockerfile](https://github.com/cortexlabs/cortex/tree/master/images/python-predictor-gpu/Dockerfile) (for GPU), or [images/python-predictor-inf/Dockerfile](https://github.com/cortexlabs/cortex/tree/master/images/python-predictor-inf/Dockerfile) (for Inferentia).
The pre-installed system packages are listed in [images/python-predictor-cpu/Dockerfile](https://github.com/cortexlabs/cortex/tree/0.19/images/python-predictor-cpu/Dockerfile) (for CPU), [images/python-predictor-gpu/Dockerfile](https://github.com/cortexlabs/cortex/tree/0.19/images/python-predictor-gpu/Dockerfile) (for GPU), or [images/python-predictor-inf/Dockerfile](https://github.com/cortexlabs/cortex/tree/0.19/images/python-predictor-inf/Dockerfile) (for Inferentia).

If your application requires additional dependencies, you can install additional [Python packages](../python-packages.md) and [system packages](../system-packages.md).

Expand Down Expand Up @@ -187,7 +187,7 @@ class TensorFlowPredictor:
```

<!-- CORTEX_VERSION_MINOR -->
Cortex provides a `tensorflow_client` to your Predictor's constructor. `tensorflow_client` is an instance of [TensorFlowClient](https://github.com/cortexlabs/cortex/tree/master/pkg/workloads/cortex/lib/client/tensorflow.py) that manages a connection to a TensorFlow Serving container to make predictions using your model. It should be saved as an instance variable in your Predictor, and your `predict()` function should call `tensorflow_client.predict()` to make an inference with your exported TensorFlow model. Preprocessing of the JSON payload and postprocessing of predictions can be implemented in your `predict()` function as well.
Cortex provides a `tensorflow_client` to your Predictor's constructor. `tensorflow_client` is an instance of [TensorFlowClient](https://github.com/cortexlabs/cortex/tree/0.19/pkg/workloads/cortex/lib/client/tensorflow.py) that manages a connection to a TensorFlow Serving container to make predictions using your model. It should be saved as an instance variable in your Predictor, and your `predict()` function should call `tensorflow_client.predict()` to make an inference with your exported TensorFlow model. Preprocessing of the JSON payload and postprocessing of predictions can be implemented in your `predict()` function as well.

When multiple models are defined using the Predictor's `models` field, the `tensorflow_client.predict()` method expects a second argument `model_name` which must hold the name of the model that you want to use for inference (for example: `self.client.predict(payload, "text-generator")`). See the [multi model guide](../../guides/multi-model.md#tensorflow-predictor) for more information.

Expand All @@ -196,7 +196,7 @@ For proper separation of concerns, it is recommended to use the constructor's `c
### Examples

<!-- CORTEX_VERSION_MINOR -->
You can find an example of a BatchAPI using a TensorFlowPredictor in [examples/batch/tensorflow](https://github.com/cortexlabs/cortex/tree/master/examples/batch/tensorflow).
You can find an example of a BatchAPI using a TensorFlowPredictor in [examples/batch/tensorflow](https://github.com/cortexlabs/cortex/tree/0.19/examples/batch/tensorflow).

### Pre-installed packages

Expand All @@ -217,7 +217,7 @@ tensorflow==2.1.0
```

<!-- CORTEX_VERSION_MINOR -->
The pre-installed system packages are listed in [images/tensorflow-predictor/Dockerfile](https://github.com/cortexlabs/cortex/tree/master/images/tensorflow-predictor/Dockerfile).
The pre-installed system packages are listed in [images/tensorflow-predictor/Dockerfile](https://github.com/cortexlabs/cortex/tree/0.19/images/tensorflow-predictor/Dockerfile).

If your application requires additional dependencies, you can install additional [Python packages](../python-packages.md) and [system packages](../system-packages.md).

Expand Down Expand Up @@ -256,7 +256,7 @@ class ONNXPredictor:
```

<!-- CORTEX_VERSION_MINOR -->
Cortex provides an `onnx_client` to your Predictor's constructor. `onnx_client` is an instance of [ONNXClient](https://github.com/cortexlabs/cortex/tree/master/pkg/workloads/cortex/lib/client/onnx.py) that manages an ONNX Runtime session to make predictions using your model. It should be saved as an instance variable in your Predictor, and your `predict()` function should call `onnx_client.predict()` to make an inference with your exported ONNX model. Preprocessing of the JSON payload and postprocessing of predictions can be implemented in your `predict()` function as well.
Cortex provides an `onnx_client` to your Predictor's constructor. `onnx_client` is an instance of [ONNXClient](https://github.com/cortexlabs/cortex/tree/0.19/pkg/workloads/cortex/lib/client/onnx.py) that manages an ONNX Runtime session to make predictions using your model. It should be saved as an instance variable in your Predictor, and your `predict()` function should call `onnx_client.predict()` to make an inference with your exported ONNX model. Preprocessing of the JSON payload and postprocessing of predictions can be implemented in your `predict()` function as well.

When multiple models are defined using the Predictor's `models` field, the `onnx_client.predict()` method expects a second argument `model_name` which must hold the name of the model that you want to use for inference (for example: `self.client.predict(model_input, "text-generator")`). See the [multi model guide](../../guides/multi-model.md#onnx-predictor) for more information.

Expand All @@ -265,7 +265,7 @@ For proper separation of concerns, it is recommended to use the constructor's `c
### Examples

<!-- CORTEX_VERSION_MINOR -->
You can find an example of a BatchAPI using an ONNXPredictor in [examples/batch/onnx](https://github.com/cortexlabs/cortex/tree/master/examples/batch/onnx).
You can find an example of a BatchAPI using an ONNXPredictor in [examples/batch/onnx](https://github.com/cortexlabs/cortex/tree/0.19/examples/batch/onnx).

### Pre-installed packages

Expand All @@ -283,6 +283,6 @@ requests==2.23.0
```

<!-- CORTEX_VERSION_MINOR x2 -->
The pre-installed system packages are listed in [images/onnx-predictor-cpu/Dockerfile](https://github.com/cortexlabs/cortex/tree/master/images/onnx-predictor-cpu/Dockerfile) (for CPU) or [images/onnx-predictor-gpu/Dockerfile](https://github.com/cortexlabs/cortex/tree/master/images/onnx-predictor-gpu/Dockerfile) (for GPU).
The pre-installed system packages are listed in [images/onnx-predictor-cpu/Dockerfile](https://github.com/cortexlabs/cortex/tree/0.19/images/onnx-predictor-cpu/Dockerfile) (for CPU) or [images/onnx-predictor-gpu/Dockerfile](https://github.com/cortexlabs/cortex/tree/0.19/images/onnx-predictor-gpu/Dockerfile) (for GPU).

If your application requires additional dependencies, you can install additional [Python packages](../python-packages.md) and [system packages](../system-packages.md).
4 changes: 2 additions & 2 deletions docs/deployments/inferentia.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ The versions of `tensorflow-neuron` and `torch-neuron` that are used by Cortex a
See AWS's [TensorFlow](https://github.com/aws/aws-neuron-sdk/blob/master/docs/tensorflow-neuron/tutorial-compile-infer.md#step-3-compile-on-compilation-instance) and [PyTorch](https://github.com/aws/aws-neuron-sdk/blob/master/docs/pytorch-neuron/tutorial-compile-infer.md#step-3-compile-on-compilation-instance) guides on how to compile models for Inferentia. Here are 2 examples implemented with Cortex:

<!-- CORTEX_VERSION_MINOR x2 -->
1. [ResNet50 in TensorFlow](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/image-classifier-resnet50)
1. [ResNet50 in PyTorch](https://github.com/cortexlabs/cortex/tree/master/examples/pytorch/image-classifier-resnet50)
1. [ResNet50 in TensorFlow](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow/image-classifier-resnet50)
1. [ResNet50 in PyTorch](https://github.com/cortexlabs/cortex/tree/0.19/examples/pytorch/image-classifier-resnet50)

### Improving performance

Expand Down
2 changes: 1 addition & 1 deletion docs/deployments/realtime-api/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ deleting my-api
<!-- CORTEX_VERSION_MINOR -->
* [Tutorial](../../../examples/pytorch/text-generator/README.md) provides a step-by-step walkthrough of deploying a text generation API
* [CLI documentation](../../miscellaneous/cli.md) lists all CLI commands
* [Examples](https://github.com/cortexlabs/cortex/tree/master/examples) demonstrate how to deploy models from common ML libraries
* [Examples](https://github.com/cortexlabs/cortex/tree/0.19/examples) demonstrate how to deploy models from common ML libraries
2 changes: 1 addition & 1 deletion docs/deployments/realtime-api/parallelism.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ When optimizing for maximum throughput, a good rule of thumb is to follow these
1. Use the load test to determine the peak throughput of the API replica. Multiply the observed throughput by the `batch_interval` to calculate the average batch size. If the average batch size coincides with `max_batch_size`, then it might mean that the throughput could still be further increased by increasing `max_batch_size`. If it's lower, then it means that `batch_interval` is triggering the inference before `max_batch_size` requests have been aggregated. If modifying both `max_batch_size` and `batch_interval` doesn't improve the throughput, then the service may be bottlenecked by something else (e.g. CPU, network IO, `processes_per_replica`, `threads_per_process`, etc).

<!-- CORTEX_VERSION_MINOR x1 -->
An example of server-side batching for the TensorFlow Predictor that has been benchmarked is found in [ResNet50 in TensorFlow](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/image-classifier-resnet50#throughput-test).
An example of server-side batching for the TensorFlow Predictor that has been benchmarked is found in [ResNet50 in TensorFlow](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow/image-classifier-resnet50#throughput-test).
Loading

0 comments on commit 990a161

Please sign in to comment.