From 990a161b56c1709f66e17ea1cf7aee39f8ffef2e Mon Sep 17 00:00:00 2001 From: vishal Date: Tue, 25 Aug 2020 02:44:58 +0000 Subject: [PATCH] Update version to 0.19.0 --- README.md | 19 +++------ build/build-image.sh | 2 +- build/cli.sh | 2 +- build/push-image.sh | 2 +- docs/cluster-management/config.md | 42 +++++++++---------- docs/cluster-management/install.md | 6 +-- docs/cluster-management/update.md | 2 +- docs/deployments/batch-api/deployment.md | 2 +- docs/deployments/batch-api/predictors.md | 16 +++---- docs/deployments/inferentia.md | 4 +- docs/deployments/realtime-api/deployment.md | 2 +- docs/deployments/realtime-api/parallelism.md | 2 +- docs/deployments/realtime-api/predictors.md | 20 ++++----- docs/deployments/system-packages.md | 14 +++---- docs/guides/exporting.md | 14 +++---- docs/guides/multi-model.md | 8 ++-- docs/guides/single-node-deployment.md | 4 +- docs/summary.md | 2 +- examples/batch/image-classifier/README.md | 2 +- examples/batch/onnx/README.md | 2 +- examples/batch/tensorflow/README.md | 2 +- examples/onnx/iris-classifier/xgboost.ipynb | 2 +- examples/pytorch/text-generator/README.md | 2 +- .../inception.ipynb | 2 +- .../iris-classifier/tensorflow.ipynb | 2 +- .../tensorflow/sentiment-analyzer/bert.ipynb | 2 +- .../tensorflow/text-generator/gpt-2.ipynb | 4 +- examples/utils/throughput_test.py | 6 ++- get-cli.sh | 2 +- manager/check_cortex_version.sh | 2 +- manager/install.sh | 2 +- pkg/consts/consts.go | 4 +- pkg/workloads/cortex/serve/run.sh | 2 +- 33 files changed, 97 insertions(+), 104 deletions(-) diff --git a/README.md b/README.md index 84dde7dde1..bcf0ecbef2 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,13 @@ - - - -
- # 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. - - -[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) - -
- # 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 @@ -26,6 +15,7 @@ Cortex makes deploying, scaling, and managing machine learning systems in produc * Update APIs with no downtime. * Stream logs from your APIs to your CLI. * Monitor API performance and track predictions. +* Run A/B tests. ### Scale @@ -51,11 +41,12 @@ Here's how to deploy GPT-2 as a scalable text generation API: ```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)" ``` -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 diff --git a/build/build-image.sh b/build/build-image.sh index d6eb47f3c5..e0441e07be 100755 --- a/build/build-image.sh +++ b/build/build-image.sh @@ -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 diff --git a/build/cli.sh b/build/cli.sh index 18c5c9e3f4..92b6d06043 100755 --- a/build/cli.sh +++ b/build/cli.sh @@ -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" diff --git a/build/push-image.sh b/build/push-image.sh index 21570d4c72..73e459896b 100755 --- a/build/push-image.sh +++ b/build/push-image.sh @@ -17,7 +17,7 @@ set -euo pipefail -CORTEX_VERSION=master +CORTEX_VERSION=0.19.0 slim="false" while [[ $# -gt 0 ]]; do diff --git a/docs/cluster-management/config.md b/docs/cluster-management/config.md index eb3ea37ecb..885c12c192 100644 --- a/docs/cluster-management/config.md +++ b/docs/cluster-management/config.md @@ -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) @@ -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 @@ -76,10 +76,10 @@ log_group: cortex tags: # : 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: ``` @@ -90,19 +90,19 @@ The docker images used by the Cortex cluster can also be overridden, although th ```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 ``` diff --git a/docs/cluster-management/install.md b/docs/cluster-management/install.md index d3499d0725..56459efab5 100644 --- a/docs/cluster-management/install.md +++ b/docs/cluster-management/install.md @@ -4,7 +4,7 @@ ```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. @@ -14,7 +14,7 @@ You must have [Docker](https://docs.docker.com/install) installed to run Cortex ```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 @@ -60,6 +60,6 @@ You can now run the same commands shown above to deploy the text generator to AW * 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. diff --git a/docs/cluster-management/update.md b/docs/cluster-management/update.md index af12b6b777..cfe76b6f32 100644 --- a/docs/cluster-management/update.md +++ b/docs/cluster-management/update.md @@ -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 diff --git a/docs/deployments/batch-api/deployment.md b/docs/deployments/batch-api/deployment.md index a6ef2a5791..abb441f791 100644 --- a/docs/deployments/batch-api/deployment.md +++ b/docs/deployments/batch-api/deployment.md @@ -122,4 +122,4 @@ deleting my-api * [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 diff --git a/docs/deployments/batch-api/predictors.md b/docs/deployments/batch-api/predictors.md index eda1b28243..bdda4d4212 100644 --- a/docs/deployments/batch-api/predictors.md +++ b/docs/deployments/batch-api/predictors.md @@ -79,7 +79,7 @@ For proper separation of concerns, it is recommended to use the constructor's `c ### Examples -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 @@ -148,7 +148,7 @@ torchvision==0.4.2 ``` -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). @@ -187,7 +187,7 @@ class TensorFlowPredictor: ``` -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. @@ -196,7 +196,7 @@ For proper separation of concerns, it is recommended to use the constructor's `c ### Examples -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 @@ -217,7 +217,7 @@ tensorflow==2.1.0 ``` -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). @@ -256,7 +256,7 @@ class ONNXPredictor: ``` -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. @@ -265,7 +265,7 @@ For proper separation of concerns, it is recommended to use the constructor's `c ### Examples -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 @@ -283,6 +283,6 @@ requests==2.23.0 ``` -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). diff --git a/docs/deployments/inferentia.md b/docs/deployments/inferentia.md index 8278e678e7..c5685063cc 100644 --- a/docs/deployments/inferentia.md +++ b/docs/deployments/inferentia.md @@ -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: -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 diff --git a/docs/deployments/realtime-api/deployment.md b/docs/deployments/realtime-api/deployment.md index 8f26aeaa10..4fa39ac09f 100644 --- a/docs/deployments/realtime-api/deployment.md +++ b/docs/deployments/realtime-api/deployment.md @@ -63,4 +63,4 @@ deleting my-api * [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 diff --git a/docs/deployments/realtime-api/parallelism.md b/docs/deployments/realtime-api/parallelism.md index e07f7c11c8..c4d34f39ba 100644 --- a/docs/deployments/realtime-api/parallelism.md +++ b/docs/deployments/realtime-api/parallelism.md @@ -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). -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). diff --git a/docs/deployments/realtime-api/predictors.md b/docs/deployments/realtime-api/predictors.md index 501a6fa820..16fcceb082 100644 --- a/docs/deployments/realtime-api/predictors.md +++ b/docs/deployments/realtime-api/predictors.md @@ -92,10 +92,10 @@ Your `predictor` method can return different types of objects such as `JSON`-par ### Examples -Many of the [examples](https://github.com/cortexlabs/cortex/tree/master/examples) use the Python Predictor, including all of the PyTorch examples. +Many of the [examples](https://github.com/cortexlabs/cortex/tree/0.19/examples) use the Python Predictor, including all of the PyTorch examples. -Here is the Predictor for [examples/pytorch/text-generator](https://github.com/cortexlabs/cortex/tree/master/examples/pytorch/text-generator): +Here is the Predictor for [examples/pytorch/text-generator](https://github.com/cortexlabs/cortex/tree/0.19/examples/pytorch/text-generator): ```python import torch @@ -183,7 +183,7 @@ torchvision==0.4.2 ``` -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). @@ -229,7 +229,7 @@ class TensorFlowPredictor: ``` -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. @@ -242,10 +242,10 @@ Your `predictor` method can return different types of objects such as `JSON`-par ### Examples -Most of the examples in [examples/tensorflow](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow) use the TensorFlow Predictor. +Most of the examples in [examples/tensorflow](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow) use the TensorFlow Predictor. -Here is the Predictor for [examples/tensorflow/iris-classifier](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/iris-classifier): +Here is the Predictor for [examples/tensorflow/iris-classifier](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow/iris-classifier): ```python labels = ["setosa", "versicolor", "virginica"] @@ -279,7 +279,7 @@ tensorflow==2.1.0 ``` -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). @@ -325,7 +325,7 @@ class ONNXPredictor: ``` -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. @@ -338,7 +338,7 @@ Your `predictor` method can return different types of objects such as `JSON`-par ### Examples -[examples/onnx/iris-classifier](https://github.com/cortexlabs/cortex/tree/master/examples/onnx/iris-classifier) uses the ONNX Predictor: +[examples/onnx/iris-classifier](https://github.com/cortexlabs/cortex/tree/0.19/examples/onnx/iris-classifier) uses the ONNX Predictor: ```python labels = ["setosa", "versicolor", "virginica"] @@ -376,7 +376,7 @@ requests==2.23.0 ``` -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). diff --git a/docs/deployments/system-packages.md b/docs/deployments/system-packages.md index 2b38d82c77..8bfce0a7da 100644 --- a/docs/deployments/system-packages.md +++ b/docs/deployments/system-packages.md @@ -47,12 +47,12 @@ mkdir my-api && cd my-api && touch Dockerfile Cortex's base Docker images are listed below. Depending on the Cortex Predictor and compute type specified in your API configuration, choose one of these images to use as the base for your Docker image: -* Python Predictor (CPU): `cortexlabs/python-predictor-cpu-slim:master` -* Python Predictor (GPU): `cortexlabs/python-predictor-gpu-slim:master-cuda10.1` (also available in cuda10.0, cuda10.2, and cuda11.0) -* Python Predictor (Inferentia): `cortexlabs/python-predictor-inf-slim:master` -* TensorFlow Predictor (CPU, GPU, Inferentia): `cortexlabs/tensorflow-predictor-slim:master` -* ONNX Predictor (CPU): `cortexlabs/onnx-predictor-cpu-slim:master` -* ONNX Predictor (GPU): `cortexlabs/onnx-predictor-gpu-slim:master` +* Python Predictor (CPU): `cortexlabs/python-predictor-cpu-slim:0.19.0` +* Python Predictor (GPU): `cortexlabs/python-predictor-gpu-slim:0.19.0-cuda10.1` (also available in cuda10.0, cuda10.2, and cuda11.0) +* Python Predictor (Inferentia): `cortexlabs/python-predictor-inf-slim:0.19.0` +* TensorFlow Predictor (CPU, GPU, Inferentia): `cortexlabs/tensorflow-predictor-slim:0.19.0` +* ONNX Predictor (CPU): `cortexlabs/onnx-predictor-cpu-slim:0.19.0` +* ONNX Predictor (GPU): `cortexlabs/onnx-predictor-gpu-slim:0.19.0` Note: the images listed above use the `-slim` suffix; Cortex's default API images are not `-slim`, since they have additional dependencies installed to cover common use cases. If you are building your own Docker image, starting with a `-slim` Predictor image will result in a smaller image size. @@ -62,7 +62,7 @@ The sample Dockerfile below inherits from Cortex's Python CPU serving image, and ```dockerfile # Dockerfile -FROM cortexlabs/python-predictor-cpu-slim:master +FROM cortexlabs/python-predictor-cpu-slim:0.19.0 RUN apt-get update \ && apt-get install -y tree \ diff --git a/docs/guides/exporting.md b/docs/guides/exporting.md index a3b1c552dd..858a9a7112 100644 --- a/docs/guides/exporting.md +++ b/docs/guides/exporting.md @@ -11,7 +11,7 @@ Here are examples for some common ML libraries: The recommended approach is export your PyTorch model with [torch.save()](https://pytorch.org/docs/stable/torch.html?highlight=save#torch.save). Here is PyTorch's documentation on [saving and loading models](https://pytorch.org/tutorials/beginner/saving_loading_models.html). -[examples/pytorch/iris-classifier](https://github.com/cortexlabs/cortex/blob/master/examples/pytorch/iris-classifier) exports its trained model like this: +[examples/pytorch/iris-classifier](https://github.com/cortexlabs/cortex/blob/0.19/examples/pytorch/iris-classifier) exports its trained model like this: ```python torch.save(model.state_dict(), "weights.pth") @@ -24,7 +24,7 @@ For Inferentia-equipped instances, check the [Inferentia instructions](inferenti It may also be possible to export your PyTorch model into the ONNX format using [torch.onnx.export()](https://pytorch.org/docs/stable/onnx.html#torch.onnx.export). -For example, if [examples/pytorch/iris-classifier](https://github.com/cortexlabs/cortex/blob/master/examples/pytorch/iris-classifier) were to export the model to ONNX, it would look like this: +For example, if [examples/pytorch/iris-classifier](https://github.com/cortexlabs/cortex/blob/0.19/examples/pytorch/iris-classifier) were to export the model to ONNX, it would look like this: ```python placeholder = torch.randn(1, 4) @@ -62,7 +62,7 @@ A TensorFlow `SavedModel` directory should have this structure: ``` -Most of the TensorFlow examples use this approach. Here is the relevant code from [examples/tensorflow/sentiment-analyzer](https://github.com/cortexlabs/cortex/blob/master/examples/tensorflow/sentiment-analyzer): +Most of the TensorFlow examples use this approach. Here is the relevant code from [examples/tensorflow/sentiment-analyzer](https://github.com/cortexlabs/cortex/blob/0.19/examples/tensorflow/sentiment-analyzer): ```python import tensorflow as tf @@ -100,14 +100,14 @@ aws s3 cp bert.zip s3://my-bucket/bert.zip ``` -[examples/tensorflow/iris-classifier](https://github.com/cortexlabs/cortex/blob/master/examples/tensorflow/iris-classifier) also use the `SavedModel` approach, and includes a Python notebook demonstrating how it was exported. +[examples/tensorflow/iris-classifier](https://github.com/cortexlabs/cortex/blob/0.19/examples/tensorflow/iris-classifier) also use the `SavedModel` approach, and includes a Python notebook demonstrating how it was exported. ### Other model formats There are other ways to export Keras or TensorFlow models, and as long as they can be loaded and used to make predictions in Python, they will be supported by Cortex. -For example, the `crnn` API in [examples/tensorflow/license-plate-reader](https://github.com/cortexlabs/cortex/blob/master/examples/tensorflow/license-plate-reader) uses this approach. +For example, the `crnn` API in [examples/tensorflow/license-plate-reader](https://github.com/cortexlabs/cortex/blob/0.19/examples/tensorflow/license-plate-reader) uses this approach. ## Scikit-learn @@ -116,7 +116,7 @@ For example, the `crnn` API in [examples/tensorflow/license-plate-reader](https: Scikit-learn models are typically exported using `pickle`. Here is [Scikit-learn's documentation](https://scikit-learn.org/stable/modules/model_persistence.html). -[examples/sklearn/iris-classifier](https://github.com/cortexlabs/cortex/blob/master/examples/sklearn/iris-classifier) uses this approach. Here is the relevant code: +[examples/sklearn/iris-classifier](https://github.com/cortexlabs/cortex/blob/0.19/examples/sklearn/iris-classifier) uses this approach. Here is the relevant code: ```python pickle.dump(model, open("model.pkl", "wb")) @@ -169,7 +169,7 @@ model.save_model("model.bin") It is also possible to export an XGBoost model to the ONNX format using [onnxmltools](https://github.com/onnx/onnxmltools). -[examples/onnx/iris-classifier](https://github.com/cortexlabs/cortex/blob/master/examples/onnx/iris-classifier) uses this approach. Here is the relevant code: +[examples/onnx/iris-classifier](https://github.com/cortexlabs/cortex/blob/0.19/examples/onnx/iris-classifier) uses this approach. Here is the relevant code: ```python from onnxmltools.convert import convert_xgboost diff --git a/docs/guides/multi-model.md b/docs/guides/multi-model.md index e7cf4a38ad..eaa47c3c06 100644 --- a/docs/guides/multi-model.md +++ b/docs/guides/multi-model.md @@ -1,14 +1,14 @@ # Multi-model endpoints -It is possible to serve multiple models in the same Cortex API using any type of Cortex Predictor. In this guide we'll show the general outline of a multi-model deployment. The section for each predictor type is based on a corresponding example that can be found in the [examples directory](https://github.com/cortexlabs/cortex/tree/master/examples) of the Cortex project. +It is possible to serve multiple models in the same Cortex API using any type of Cortex Predictor. In this guide we'll show the general outline of a multi-model deployment. The section for each predictor type is based on a corresponding example that can be found in the [examples directory](https://github.com/cortexlabs/cortex/tree/0.19/examples) of the Cortex project. ## Python Predictor For the Python Predictor, the API configuration for a multi-model API is similar to single-model APIs. The Predictor's `config` field can be used to customize the behavior of the `predictor.py` implementation. -The following template is based on the [pytorch/multi-model-text-analyzer](https://github.com/cortexlabs/cortex/tree/master/examples/pytorch/multi-model-text-analyzer) example. +The following template is based on the [pytorch/multi-model-text-analyzer](https://github.com/cortexlabs/cortex/tree/0.19/examples/pytorch/multi-model-text-analyzer) example. ### `cortex.yaml` @@ -86,7 +86,7 @@ Machine learning is the study of algorithms and statistical models that computer For the TensorFlow Predictor, a multi-model API is configured by placing the list of models in the Predictor's `models` field (each model will specify its own unique name). The `predict()` method of the `tensorflow_client` object expects a second argument that represents the name of the model that will be used for inference. -The following template is based on the [tensorflow/multi-model-classifier](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/multi-model-classifier) example. +The following template is based on the [tensorflow/multi-model-classifier](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow/multi-model-classifier) example. ### `cortex.yaml` @@ -169,7 +169,7 @@ $ curl "${ENDPOINT}?model=inception" -X POST -H "Content-Type: application/json" For the ONNX Predictor, a multi-model API is configured by placing the list of models in the Predictor's `models` field (each model will specify its own unique name). The `predict()` method of the `onnx_client` object expects a second argument that represents the name of the model that will be used for inference. -The following template is based on the [onnx/multi-model-classifier](https://github.com/cortexlabs/cortex/tree/master/examples/onnx/multi-model-classifier) example. +The following template is based on the [onnx/multi-model-classifier](https://github.com/cortexlabs/cortex/tree/0.19/examples/onnx/multi-model-classifier) example. ### `cortex.yaml` diff --git a/docs/guides/single-node-deployment.md b/docs/guides/single-node-deployment.md index bc21a2ff8a..f62f5ab041 100644 --- a/docs/guides/single-node-deployment.md +++ b/docs/guides/single-node-deployment.md @@ -107,7 +107,7 @@ Install the Cortex CLI. ```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)" ``` ### Step 13 @@ -116,7 +116,7 @@ You can now use Cortex to deploy your model: ```bash -$ git clone -b master https://github.com/cortexlabs/cortex.git +$ git clone -b 0.19 https://github.com/cortexlabs/cortex.git $ cd cortex/examples/pytorch/text-generator diff --git a/docs/summary.md b/docs/summary.md index 6ff7cfa2d7..4a8ced2bd5 100644 --- a/docs/summary.md +++ b/docs/summary.md @@ -4,7 +4,7 @@ * [Install](cluster-management/install.md) * [Tutorial](../examples/pytorch/text-generator/README.md) * [GitHub](https://github.com/cortexlabs/cortex) -* [Examples](https://github.com/cortexlabs/cortex/tree/master/examples) +* [Examples](https://github.com/cortexlabs/cortex/tree/0.19/examples) * [Contact us](miscellaneous/contact-us.md) ## Deployments diff --git a/examples/batch/image-classifier/README.md b/examples/batch/image-classifier/README.md index fc2a5e9310..0ba379b25b 100644 --- a/examples/batch/image-classifier/README.md +++ b/examples/batch/image-classifier/README.md @@ -575,7 +575,7 @@ Running `cortex delete` will stop all in progress jobs for the API and will dele ## Next steps -* Deploy another one of our [batch examples](https://github.com/cortexlabs/cortex/tree/master/examples/batch). +* Deploy another one of our [batch examples](https://github.com/cortexlabs/cortex/tree/0.19/examples/batch). * See our [exporting guide](../../../docs/guides/exporting.md) for how to export your model to use in an API. * Try the [realtime API tutorial](../../pytorch/text-generator/README.md) to learn how to deploy realtime APIs in Cortex. * See [uninstall](../../../docs/cluster-management/uninstall.md) if you'd like to spin down your cluster. diff --git a/examples/batch/onnx/README.md b/examples/batch/onnx/README.md index 404649260e..3f3476d997 100644 --- a/examples/batch/onnx/README.md +++ b/examples/batch/onnx/README.md @@ -3,4 +3,4 @@ _this is an example for cortex release 0.19 and may not deploy correctly on other releases of cortex_ -Please refer to the [tutorial](https://docs.cortex.dev/v/master/batch-api/image-classifier#deploy-your-batch-api) to see how to deploy a Batch API with Cortex. +Please refer to the [tutorial](https://docs.cortex.dev/v/0.19/batch-api/image-classifier#deploy-your-batch-api) to see how to deploy a Batch API with Cortex. diff --git a/examples/batch/tensorflow/README.md b/examples/batch/tensorflow/README.md index f515437f44..bb9f257c90 100644 --- a/examples/batch/tensorflow/README.md +++ b/examples/batch/tensorflow/README.md @@ -3,4 +3,4 @@ _this is an example for cortex release 0.19 and may not deploy correctly on other releases of cortex_ -Please refer to the [tutorial](https://docs.cortex.dev/v/master/batch-api/image-classifier#deploy-your-batch-api) to see how to deploy a Batch API with Cortex. +Please refer to the [tutorial](https://docs.cortex.dev/v/0.19/batch-api/image-classifier#deploy-your-batch-api) to see how to deploy a Batch API with Cortex. diff --git a/examples/onnx/iris-classifier/xgboost.ipynb b/examples/onnx/iris-classifier/xgboost.ipynb index 3011d657f9..c33066429a 100644 --- a/examples/onnx/iris-classifier/xgboost.ipynb +++ b/examples/onnx/iris-classifier/xgboost.ipynb @@ -237,7 +237,7 @@ }, "source": [ "\n", - "That's it! See the [example](https://github.com/cortexlabs/cortex/tree/master/examples/onnx/iris-classifier) for how to deploy the model as an API." + "That's it! See the [example](https://github.com/cortexlabs/cortex/tree/0.19/examples/onnx/iris-classifier) for how to deploy the model as an API." ] } ] diff --git a/examples/pytorch/text-generator/README.md b/examples/pytorch/text-generator/README.md index 234d60914d..49bf79ae80 100644 --- a/examples/pytorch/text-generator/README.md +++ b/examples/pytorch/text-generator/README.md @@ -299,7 +299,7 @@ Running `cortex delete` will free up cluster resources and allow Cortex to scale ## Next steps -* Deploy another one of our [examples](https://github.com/cortexlabs/cortex/tree/master/examples). +* Deploy another one of our [examples](https://github.com/cortexlabs/cortex/tree/0.19/examples). * See our [exporting guide](../../../docs/guides/exporting.md) for how to export your model to use in an API. * Try the [batch API tutorial](../../batch/image-classifier/README.md) to learn how to deploy batch APIs in Cortex. * See our [traffic splitter example](../../traffic-splitter/README.md) for how to deploy multiple APIs and set up a traffic splitter. diff --git a/examples/tensorflow/image-classifier-inception/inception.ipynb b/examples/tensorflow/image-classifier-inception/inception.ipynb index e8bf6290d9..ee2b9fdbc4 100644 --- a/examples/tensorflow/image-classifier-inception/inception.ipynb +++ b/examples/tensorflow/image-classifier-inception/inception.ipynb @@ -204,7 +204,7 @@ }, "source": [ "\n", - "That's it! See the [example on GitHub](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/image-classifier) for how to deploy the model as an API." + "That's it! See the [example on GitHub](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow/image-classifier-inception) for how to deploy the model as an API." ] } ] diff --git a/examples/tensorflow/iris-classifier/tensorflow.ipynb b/examples/tensorflow/iris-classifier/tensorflow.ipynb index c1531d01d3..5e22bee77b 100644 --- a/examples/tensorflow/iris-classifier/tensorflow.ipynb +++ b/examples/tensorflow/iris-classifier/tensorflow.ipynb @@ -289,7 +289,7 @@ }, "source": [ "\n", - "That's it! See the [example on GitHub](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/iris-classifier) for how to deploy the model as an API." + "That's it! See the [example on GitHub](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow/iris-classifier) for how to deploy the model as an API." ] } ] diff --git a/examples/tensorflow/sentiment-analyzer/bert.ipynb b/examples/tensorflow/sentiment-analyzer/bert.ipynb index 8a92831fe0..bf4ed4e673 100644 --- a/examples/tensorflow/sentiment-analyzer/bert.ipynb +++ b/examples/tensorflow/sentiment-analyzer/bert.ipynb @@ -1000,7 +1000,7 @@ }, "source": [ "\n", - "That's it! See the [example on GitHub](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/sentiment-analyzer) for how to deploy the model as an API." + "That's it! See the [example on GitHub](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow/sentiment-analyzer) for how to deploy the model as an API." ] } ] diff --git a/examples/tensorflow/text-generator/gpt-2.ipynb b/examples/tensorflow/text-generator/gpt-2.ipynb index cbd970bd14..47b23a28a9 100644 --- a/examples/tensorflow/text-generator/gpt-2.ipynb +++ b/examples/tensorflow/text-generator/gpt-2.ipynb @@ -346,7 +346,7 @@ }, "source": [ "\n", - "We also need to upload `vocab.bpe` and `encoder.json`, so that the [encoder](https://github.com/cortexlabs/cortex/blob/master/examples/tensorflow/text-generator/encoder.py) in the [Predictor](https://github.com/cortexlabs/cortex/blob/master/examples/tensorflow/text-generator/predictor.py) can encode the input text before making a request to the model." + "We also need to upload `vocab.bpe` and `encoder.json`, so that the [encoder](https://github.com/cortexlabs/cortex/blob/0.19/examples/tensorflow/text-generator/encoder.py) in the [Predictor](https://github.com/cortexlabs/cortex/blob/0.19/examples/tensorflow/text-generator/predictor.py) can encode the input text before making a request to the model." ] }, { @@ -376,7 +376,7 @@ }, "source": [ "\n", - "That's it! See the [example on GitHub](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/text-generator) for how to deploy the model as an API." + "That's it! See the [example on GitHub](https://github.com/cortexlabs/cortex/tree/0.19/examples/tensorflow/text-generator) for how to deploy the model as an API." ] } ] diff --git a/examples/utils/throughput_test.py b/examples/utils/throughput_test.py index fa1b29531a..4f4cc215b9 100644 --- a/examples/utils/throughput_test.py +++ b/examples/utils/throughput_test.py @@ -1,3 +1,5 @@ +# this is an example for cortex release 0.19 and may not deploy correctly on other releases of cortex + import os import sys import click @@ -126,7 +128,7 @@ def task(data, endpoint, samples, time_based): if time_based == 0.0: for i in range(samples): try: - resp = requests.post(endpoint, data=data, headers=headers, timeout=timeout,) + resp = requests.post(endpoint, data=data, headers=headers, timeout=timeout) except Exception as e: print(e) break @@ -137,7 +139,7 @@ def task(data, endpoint, samples, time_based): counter = 0 while start + time_based >= time.time(): try: - resp = requests.post(endpoint, data=data, headers=headers, timeout=timeout,) + resp = requests.post(endpoint, data=data, headers=headers, timeout=timeout) except Exception as e: print(e) break diff --git a/get-cli.sh b/get-cli.sh index b0aecbf2ad..9b8fecc0ae 100755 --- a/get-cli.sh +++ b/get-cli.sh @@ -16,7 +16,7 @@ set -e -CORTEX_VERSION_BRANCH_STABLE=master +CORTEX_VERSION_BRANCH_STABLE=0.19.0 case "$OSTYPE" in darwin*) parsed_os="darwin" ;; diff --git a/manager/check_cortex_version.sh b/manager/check_cortex_version.sh index 39d1866228..6245770012 100755 --- a/manager/check_cortex_version.sh +++ b/manager/check_cortex_version.sh @@ -16,7 +16,7 @@ set -e -CORTEX_VERSION=master +CORTEX_VERSION=0.19.0 if [ "$CORTEX_VERSION" != "$CORTEX_CLI_VERSION" ]; then echo "error: your CLI version ($CORTEX_CLI_VERSION) doesn't match your Cortex manager image version ($CORTEX_VERSION); please update your CLI by following the instructions at https://docs.cortex.dev/install, or update your Cortex manager image by modifying the value for \`image_manager\` in your cluster configuration file (e.g. cluster.yaml) and running \`cortex cluster configure --config cluster.yaml\` (update other image paths in cluster.yaml as well if necessary)" diff --git a/manager/install.sh b/manager/install.sh index 210bcb67c7..7996b0dec8 100755 --- a/manager/install.sh +++ b/manager/install.sh @@ -16,7 +16,7 @@ set -eo pipefail -export CORTEX_VERSION=master +export CORTEX_VERSION=0.19.0 EKSCTL_TIMEOUT=45m arg1="$1" diff --git a/pkg/consts/consts.go b/pkg/consts/consts.go index 5f641e78ae..102084cc6b 100644 --- a/pkg/consts/consts.go +++ b/pkg/consts/consts.go @@ -24,8 +24,8 @@ import ( ) var ( - CortexVersion = "master" // CORTEX_VERSION - CortexVersionMinor = "master" // CORTEX_VERSION_MINOR + CortexVersion = "0.19.0" // CORTEX_VERSION + CortexVersionMinor = "0.19" // CORTEX_VERSION_MINOR SingleModelName = "_cortex_default" diff --git a/pkg/workloads/cortex/serve/run.sh b/pkg/workloads/cortex/serve/run.sh index 4de3fc693f..9f114b9c69 100755 --- a/pkg/workloads/cortex/serve/run.sh +++ b/pkg/workloads/cortex/serve/run.sh @@ -17,7 +17,7 @@ set -e # CORTEX_VERSION x1 -export EXPECTED_CORTEX_VERSION=master +export EXPECTED_CORTEX_VERSION=0.19.0 if [ "$CORTEX_VERSION" != "$EXPECTED_CORTEX_VERSION" ]; then if [ "$CORTEX_PROVIDER" == "local" ]; then