diff --git a/build/lint.sh b/build/lint.sh index e11f047c1d..981f113f10 100755 --- a/build/lint.sh +++ b/build/lint.sh @@ -153,11 +153,12 @@ else # Check for version warning comments in examples output=$(cd "$ROOT/examples" && find . -type f \ - ! -name "README.md" \ + ! -path "./README.md" \ + ! -path "./utils/*" \ ! -name "*.json" \ ! -name "*.txt" \ ! -name ".*" \ - -exec grep -L "WARNING: you are on the master branch, please refer to the examples on the branch that matches your \`cortex version\`" {} \;) + -exec grep -L "WARNING: you are on the master branch; please refer to examples on the branch corresponding to your \`cortex version\` (e\.g\. for version [0-9]*\.[0-9]*\.\*, run \`git checkout -b [0-9]*\.[0-9]*\` or switch to the \`[0-9]*\.[0-9]*\` branch on GitHub)" {} \;) if [[ $output ]]; then echo "example file(s) are missing version appropriate comment:" echo "$output" diff --git a/dev/update_version_comments.sh b/dev/update_version_comments.sh index 68e0384933..1af947c9c2 100755 --- a/dev/update_version_comments.sh +++ b/dev/update_version_comments.sh @@ -19,11 +19,50 @@ set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)" +arg1="${1:-""}" + git_branch="${CIRCLE_BRANCH:-""}" if [ "$git_branch" = "" ]; then git_branch=$(cd "$ROOT" && git rev-parse --abbrev-ref HEAD) fi +if [ -z "$git_branch" ]; then + echo "error: unable to determine git branch" + exit 1 +fi + +if [ "$git_branch" = "master" ]; then + if [ -z "$arg1" ]; then + echo "error: use \`./dev/update_version_comments.sh \` to update all docs and examples warnings" + exit 1 + fi + + if [[ "$OSTYPE" == "darwin"* ]]; then + cd "$ROOT" && find . -type f \ + ! -path "./build/lint.sh" \ + ! -path "./dev/update_version_comments.sh" \ + ! -path "./vendor/*" \ + ! -path "./bin/*" \ + ! -path "./.git/*" \ + ! -name ".*" \ + -print0 | \ + xargs -0 sed -i '' -e "s/WARNING: you are on the master branch; please refer to examples on the branch corresponding to your \`cortex version\` [(]e\.g\. for version [0-9]*\.[0-9]*\.\*, run \`git checkout -b [0-9]*\.[0-9]*\` or switch to the \`[0-9]*\.[0-9]*\` branch on GitHub[)]/WARNING: you are on the master branch; please refer to examples on the branch corresponding to your \`cortex version\` (e.g. for version ${arg1}.*, run \`git checkout -b ${arg1}\` or switch to the \`${arg1}\` branch on GitHub)/" + else + cd "$ROOT" && find . -type f \ + ! -path "./build/lint.sh" \ + ! -path "./dev/update_version_comments.sh" \ + ! -path "./vendor/*" \ + ! -path "./bin/*" \ + ! -path "./.git/*" \ + ! -name ".*" \ + -print0 | \ + xargs -0 sed -i "s/WARNING: you are on the master branch; please refer to examples on the branch corresponding to your \`cortex version\` [(]e\.g\. for version [0-9]*\.[0-9]*\.\*, run \`git checkout -b [0-9]*\.[0-9]*\` or switch to the \`[0-9]*\.[0-9]*\` branch on GitHub[)]/WARNING: you are on the master branch; please refer to examples on the branch corresponding to your \`cortex version\` (e.g. for version ${arg1}.*, run \`git checkout -b ${arg1}\` or switch to the \`${arg1}\` branch on GitHub)/" + fi + + echo "done" + exit 0 +fi + if ! echo "$git_branch" | grep -Eq ^[0-9]+.[0-9]+$; then echo "error: this is meant to be run on release branches" exit 1 @@ -60,7 +99,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then ! -path "./.git/*" \ ! -name ".*" \ -print0 | \ - xargs -0 sed -i '' -e "s/WARNING: you are on the master branch, please refer to the examples on the branch that matches your \`cortex version\`/this is an example for cortex release ${git_branch} and may not deploy correctly on other releases of cortex/" + xargs -0 sed -i '' -e "s/WARNING: you are on the master branch; please refer to examples on the branch corresponding to your \`cortex version\` [(]e\.g\. for version [0-9]*\.[0-9]*\.\*, run \`git checkout -b [0-9]*\.[0-9]*\` or switch to the \`[0-9]*\.[0-9]*\` branch on GitHub[)]/this is an example for cortex release ${git_branch} and may not deploy correctly on other releases of cortex/" else cd "$ROOT" && find . -type f \ ! -path "./build/lint.sh" \ @@ -70,7 +109,7 @@ else ! -path "./.git/*" \ ! -name ".*" \ -print0 | \ - xargs -0 sed -i "s/WARNING: you are on the master branch, please refer to the examples on the branch that matches your \`cortex version\`/this is an example for cortex release ${git_branch} and may not deploy correctly on other releases of cortex/" + xargs -0 sed -i "s/WARNING: you are on the master branch; please refer to examples on the branch corresponding to your \`cortex version\` [(]e\.g\. for version [0-9]*\.[0-9]*\.\*, run \`git checkout -b [0-9]*\.[0-9]*\` or switch to the \`[0-9]*\.[0-9]*\` branch on GitHub[)]/this is an example for cortex release ${git_branch} and may not deploy correctly on other releases of cortex/" fi echo "done" diff --git a/examples/apisplitter/README.md b/examples/apisplitter/README.md index 7b16ce9387..5d7015dc10 100644 --- a/examples/apisplitter/README.md +++ b/examples/apisplitter/README.md @@ -1,6 +1,6 @@ # Splitting traffic between APIs -_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ This example shows how to split traffic between 2 different iris-classifiers deployed as SyncAPIs. diff --git a/examples/apisplitter/cortex.yaml b/examples/apisplitter/cortex.yaml index cb1cc3cacd..97da4635dd 100644 --- a/examples/apisplitter/cortex.yaml +++ b/examples/apisplitter/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: iris-classifier-onnx kind: SyncAPI diff --git a/examples/apisplitter/onnx_predictor.py b/examples/apisplitter/onnx_predictor.py index 1526cdcc36..7e851e81bf 100644 --- a/examples/apisplitter/onnx_predictor.py +++ b/examples/apisplitter/onnx_predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) labels = ["setosa", "versicolor", "virginica"] diff --git a/examples/apisplitter/tensorflow_predictor.py b/examples/apisplitter/tensorflow_predictor.py index c880d2233f..d8de5facb6 100644 --- a/examples/apisplitter/tensorflow_predictor.py +++ b/examples/apisplitter/tensorflow_predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) labels = ["setosa", "versicolor", "virginica"] diff --git a/examples/batch/image-classifier/README.md b/examples/batch/image-classifier/README.md index 3670c510b0..2ce6092c61 100644 --- a/examples/batch/image-classifier/README.md +++ b/examples/batch/image-classifier/README.md @@ -1,6 +1,6 @@ # Deploy models as Batch APIs -_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ This example shows how to deploy a batch image classification api that accepts a list of image urls as input, downloads the images, classifies them, and writes the results to S3. diff --git a/examples/batch/image-classifier/cortex.yaml b/examples/batch/image-classifier/cortex.yaml index 01c0645b0e..8eab66889f 100644 --- a/examples/batch/image-classifier/cortex.yaml +++ b/examples/batch/image-classifier/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier kind: BatchAPI diff --git a/examples/batch/image-classifier/predictor.py b/examples/batch/image-classifier/predictor.py index 0136e3db68..ffbc30496f 100644 --- a/examples/batch/image-classifier/predictor.py +++ b/examples/batch/image-classifier/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import os import requests diff --git a/examples/batch/onnx/README.md b/examples/batch/onnx/README.md index aaebf0d950..799ec688f1 100644 --- a/examples/batch/onnx/README.md +++ b/examples/batch/onnx/README.md @@ -1,6 +1,6 @@ # Batch Image Classifier in ONNX -You can deploy this example by cloning this repo with `git clone -b v https://github.com/cortexlabs/cortex`. The `` should be substituted with the version of your Cortex CLI. For example, if the output of `cortex version` is 0.18.1, the clone command would be `git clone -b v0.18.1 https://github.com/cortexlabs/cortex`. Then navigate to this example directory. +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ Please refer to the [tutorial](https://docs.cortex.dev/v/master/batchapi/image-classifier#deploy-your-batch-api) to see how to deploy a Batch API with Cortex. diff --git a/examples/batch/onnx/cortex.yaml b/examples/batch/onnx/cortex.yaml index c4678151e9..b8bcfd7ae1 100644 --- a/examples/batch/onnx/cortex.yaml +++ b/examples/batch/onnx/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier kind: BatchAPI diff --git a/examples/batch/onnx/predictor.py b/examples/batch/onnx/predictor.py index fd09041003..ed7bee2c3c 100644 --- a/examples/batch/onnx/predictor.py +++ b/examples/batch/onnx/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import requests import numpy as np diff --git a/examples/batch/tensorflow/README.md b/examples/batch/tensorflow/README.md index f56359d4c4..01950b073d 100644 --- a/examples/batch/tensorflow/README.md +++ b/examples/batch/tensorflow/README.md @@ -1,6 +1,6 @@ # Batch Image Classifier in TensorFlow -You can deploy this example by cloning this repo with `git clone -b v https://github.com/cortexlabs/cortex`. The `` should be substituted with the version of your Cortex CLI. For example, if the output of `cortex version` is 0.18.1, the clone command would be `git clone -b v0.18.1 https://github.com/cortexlabs/cortex`. Then navigate to this example directory. +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ Please refer to the [tutorial](https://docs.cortex.dev/v/master/batchapi/image-classifier#deploy-your-batch-api) to see how to deploy a Batch API with Cortex. diff --git a/examples/batch/tensorflow/cortex.yaml b/examples/batch/tensorflow/cortex.yaml index 12eec5f80e..72178f6d47 100644 --- a/examples/batch/tensorflow/cortex.yaml +++ b/examples/batch/tensorflow/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier kind: BatchAPI diff --git a/examples/batch/tensorflow/predictor.py b/examples/batch/tensorflow/predictor.py index 74b7da7c6a..3de86e81a4 100644 --- a/examples/batch/tensorflow/predictor.py +++ b/examples/batch/tensorflow/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import requests import numpy as np diff --git a/examples/keras/document-denoiser/README.md b/examples/keras/document-denoiser/README.md index 3a46d3ea16..5da420a7ee 100644 --- a/examples/keras/document-denoiser/README.md +++ b/examples/keras/document-denoiser/README.md @@ -1,5 +1,7 @@ # Clean Dirty Documents w/ Autoencoders +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + This example model cleans text documents of anything that isn't text (aka noise): coffee stains, old wear artifacts, etc. You can inspect the notebook that has been used to train the model [here](trainer.ipynb). Here's a collage of input texts and predictions. diff --git a/examples/keras/document-denoiser/cortex.yaml b/examples/keras/document-denoiser/cortex.yaml index 999890a571..8cea537133 100644 --- a/examples/keras/document-denoiser/cortex.yaml +++ b/examples/keras/document-denoiser/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: document-denoiser kind: SyncAPI diff --git a/examples/keras/document-denoiser/predictor.py b/examples/keras/document-denoiser/predictor.py index af1b625d00..dea2e6919c 100644 --- a/examples/keras/document-denoiser/predictor.py +++ b/examples/keras/document-denoiser/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import boto3, base64, cv2, re, os, requests from botocore import UNSIGNED diff --git a/examples/keras/document-denoiser/trainer.ipynb b/examples/keras/document-denoiser/trainer.ipynb index 9d05e9f445..d21746956a 100644 --- a/examples/keras/document-denoiser/trainer.ipynb +++ b/examples/keras/document-denoiser/trainer.ipynb @@ -13,7 +13,7 @@ "metadata": {}, "outputs": [], "source": [ - "# _WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_\n", + "# _WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_\n", "\n", "\n", "import keras\n", diff --git a/examples/onnx/iris-classifier/README.md b/examples/onnx/iris-classifier/README.md index deea87fad0..40530d489e 100644 --- a/examples/onnx/iris-classifier/README.md +++ b/examples/onnx/iris-classifier/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/onnx/iris-classifier/cortex.yaml b/examples/onnx/iris-classifier/cortex.yaml index cbb205535c..e8e3328d86 100644 --- a/examples/onnx/iris-classifier/cortex.yaml +++ b/examples/onnx/iris-classifier/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: iris-classifier kind: SyncAPI diff --git a/examples/onnx/iris-classifier/predictor.py b/examples/onnx/iris-classifier/predictor.py index 1526cdcc36..7e851e81bf 100644 --- a/examples/onnx/iris-classifier/predictor.py +++ b/examples/onnx/iris-classifier/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) labels = ["setosa", "versicolor", "virginica"] diff --git a/examples/onnx/iris-classifier/xgboost.ipynb b/examples/onnx/iris-classifier/xgboost.ipynb index 52ba3f2814..558789597f 100644 --- a/examples/onnx/iris-classifier/xgboost.ipynb +++ b/examples/onnx/iris-classifier/xgboost.ipynb @@ -31,7 +31,7 @@ "source": [ "# Training an Iris classifier using XGBoost\n", "\n", - "_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_\n", + "_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_\n", "\n", "In this notebook, we'll show how to train a classifier trained on the [iris data set](https://archive.ics.uci.edu/ml/datasets/iris) using XGBoost." ] diff --git a/examples/onnx/multi-model-classifier/README.md b/examples/onnx/multi-model-classifier/README.md index cdab23c686..dcf4e7caa6 100644 --- a/examples/onnx/multi-model-classifier/README.md +++ b/examples/onnx/multi-model-classifier/README.md @@ -1,5 +1,7 @@ # Multi-Model Classifier API +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + This example deploys ResNet50, MobileNet and ShuffleNet models in one API. Query parameters are used for selecting the model. The example can be run on both CPU and on GPU hardware. diff --git a/examples/onnx/multi-model-classifier/cortex.yaml b/examples/onnx/multi-model-classifier/cortex.yaml index e627ce9c01..ebd77bd555 100644 --- a/examples/onnx/multi-model-classifier/cortex.yaml +++ b/examples/onnx/multi-model-classifier/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: multi-model-classifier kind: SyncAPI diff --git a/examples/onnx/multi-model-classifier/predictor.py b/examples/onnx/multi-model-classifier/predictor.py index 49e2464c19..ac8d68e256 100644 --- a/examples/onnx/multi-model-classifier/predictor.py +++ b/examples/onnx/multi-model-classifier/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import numpy as np import cv2, requests diff --git a/examples/onnx/yolov5-youtube/README.md b/examples/onnx/yolov5-youtube/README.md index 2b7d8a0deb..650e0e8ba8 100644 --- a/examples/onnx/yolov5-youtube/README.md +++ b/examples/onnx/yolov5-youtube/README.md @@ -1,5 +1,7 @@ # YOLOv5 Detection model +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + This example deploys a detection model trained using [ultralytics' yolo repo](https://github.com/ultralytics/yolov5) using ONNX. We'll use the `yolov5s` model as an example here. In can be used to run inference on youtube videos and returns the annotated video with bounding boxes. diff --git a/examples/onnx/yolov5-youtube/cortex.yaml b/examples/onnx/yolov5-youtube/cortex.yaml index 1d0a98a06b..0bc142e1f4 100644 --- a/examples/onnx/yolov5-youtube/cortex.yaml +++ b/examples/onnx/yolov5-youtube/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: yolov5-youtube kind: SyncAPI diff --git a/examples/onnx/yolov5-youtube/predictor.py b/examples/onnx/yolov5-youtube/predictor.py index be17e13139..4b74dae9d0 100644 --- a/examples/onnx/yolov5-youtube/predictor.py +++ b/examples/onnx/yolov5-youtube/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import json import os diff --git a/examples/onnx/yolov5-youtube/utils.py b/examples/onnx/yolov5-youtube/utils.py index 3e8cfff9c8..f1ff4a71f2 100644 --- a/examples/onnx/yolov5-youtube/utils.py +++ b/examples/onnx/yolov5-youtube/utils.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import youtube_dl import ffmpeg diff --git a/examples/pytorch/answer-generator/README.md b/examples/pytorch/answer-generator/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/answer-generator/README.md +++ b/examples/pytorch/answer-generator/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/answer-generator/cortex.yaml b/examples/pytorch/answer-generator/cortex.yaml index 14b75d8b0c..82b6ee41c8 100644 --- a/examples/pytorch/answer-generator/cortex.yaml +++ b/examples/pytorch/answer-generator/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: answer-generator kind: SyncAPI diff --git a/examples/pytorch/answer-generator/generator.py b/examples/pytorch/answer-generator/generator.py index 243a934f19..0ff2597c57 100644 --- a/examples/pytorch/answer-generator/generator.py +++ b/examples/pytorch/answer-generator/generator.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) # This file includes code which was modified from https://colab.research.google.com/drive/1KTLqiAOdKM_3RnBWfqgrvOQLqumUyOdA diff --git a/examples/pytorch/answer-generator/predictor.py b/examples/pytorch/answer-generator/predictor.py index 2af6e05b88..c976381243 100644 --- a/examples/pytorch/answer-generator/predictor.py +++ b/examples/pytorch/answer-generator/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import wget import torch diff --git a/examples/pytorch/image-classifier-alexnet/README.md b/examples/pytorch/image-classifier-alexnet/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/image-classifier-alexnet/README.md +++ b/examples/pytorch/image-classifier-alexnet/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/image-classifier-alexnet/cortex.yaml b/examples/pytorch/image-classifier-alexnet/cortex.yaml index 11ccf0ab07..ed18771607 100644 --- a/examples/pytorch/image-classifier-alexnet/cortex.yaml +++ b/examples/pytorch/image-classifier-alexnet/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-alexnet kind: SyncAPI diff --git a/examples/pytorch/image-classifier-alexnet/predictor.py b/examples/pytorch/image-classifier-alexnet/predictor.py index 9b51f2fdf2..cbb594300c 100644 --- a/examples/pytorch/image-classifier-alexnet/predictor.py +++ b/examples/pytorch/image-classifier-alexnet/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import requests import torch diff --git a/examples/pytorch/image-classifier-resnet50/README.md b/examples/pytorch/image-classifier-resnet50/README.md index 07c746b44f..cb90abba17 100644 --- a/examples/pytorch/image-classifier-resnet50/README.md +++ b/examples/pytorch/image-classifier-resnet50/README.md @@ -1,5 +1,7 @@ # Image Classifier with ResNet50 +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + This example implements an image recognition system using ResNet50, which allows for the recognition of up to 1000 classes. ## Deploying diff --git a/examples/pytorch/image-classifier-resnet50/cortex.yaml b/examples/pytorch/image-classifier-resnet50/cortex.yaml index 26308129e0..1288383be7 100644 --- a/examples/pytorch/image-classifier-resnet50/cortex.yaml +++ b/examples/pytorch/image-classifier-resnet50/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-resnet50 kind: SyncAPI diff --git a/examples/pytorch/image-classifier-resnet50/cortex_gpu.yaml b/examples/pytorch/image-classifier-resnet50/cortex_gpu.yaml index f9e3381ca2..ce50d096e6 100644 --- a/examples/pytorch/image-classifier-resnet50/cortex_gpu.yaml +++ b/examples/pytorch/image-classifier-resnet50/cortex_gpu.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-resnet50 kind: SyncAPI diff --git a/examples/pytorch/image-classifier-resnet50/cortex_inf.yaml b/examples/pytorch/image-classifier-resnet50/cortex_inf.yaml index 0f474676b4..d0b35addcd 100644 --- a/examples/pytorch/image-classifier-resnet50/cortex_inf.yaml +++ b/examples/pytorch/image-classifier-resnet50/cortex_inf.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-resnet50 kind: SyncAPI diff --git a/examples/pytorch/image-classifier-resnet50/generate_resnet50_models.ipynb b/examples/pytorch/image-classifier-resnet50/generate_resnet50_models.ipynb index 6fd919ce22..65466301f5 100644 --- a/examples/pytorch/image-classifier-resnet50/generate_resnet50_models.ipynb +++ b/examples/pytorch/image-classifier-resnet50/generate_resnet50_models.ipynb @@ -6,7 +6,7 @@ "source": [ "# Generate Resnet50 Models\n", "\n", - "_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_" + "_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_" ] }, { diff --git a/examples/pytorch/image-classifier-resnet50/predictor.py b/examples/pytorch/image-classifier-resnet50/predictor.py index bfe0720505..c13f758422 100644 --- a/examples/pytorch/image-classifier-resnet50/predictor.py +++ b/examples/pytorch/image-classifier-resnet50/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import os import torch diff --git a/examples/pytorch/iris-classifier/README.md b/examples/pytorch/iris-classifier/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/iris-classifier/README.md +++ b/examples/pytorch/iris-classifier/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/iris-classifier/cortex.yaml b/examples/pytorch/iris-classifier/cortex.yaml index 64c241f4a6..bb4b3ee9c1 100644 --- a/examples/pytorch/iris-classifier/cortex.yaml +++ b/examples/pytorch/iris-classifier/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: iris-classifier kind: SyncAPI diff --git a/examples/pytorch/iris-classifier/model.py b/examples/pytorch/iris-classifier/model.py index 5690c22f46..215d008ec7 100644 --- a/examples/pytorch/iris-classifier/model.py +++ b/examples/pytorch/iris-classifier/model.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import torch import torch.nn as nn diff --git a/examples/pytorch/iris-classifier/predictor.py b/examples/pytorch/iris-classifier/predictor.py index fac8c12030..4ce38ff33c 100644 --- a/examples/pytorch/iris-classifier/predictor.py +++ b/examples/pytorch/iris-classifier/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import re import torch diff --git a/examples/pytorch/language-identifier/README.md b/examples/pytorch/language-identifier/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/language-identifier/README.md +++ b/examples/pytorch/language-identifier/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/language-identifier/cortex.yaml b/examples/pytorch/language-identifier/cortex.yaml index af70e32229..f79488b9af 100644 --- a/examples/pytorch/language-identifier/cortex.yaml +++ b/examples/pytorch/language-identifier/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: language-identifier kind: SyncAPI diff --git a/examples/pytorch/language-identifier/predictor.py b/examples/pytorch/language-identifier/predictor.py index 5214ed35a6..1eb35ae1e6 100644 --- a/examples/pytorch/language-identifier/predictor.py +++ b/examples/pytorch/language-identifier/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import wget import fasttext diff --git a/examples/pytorch/multi-model-text-analyzer/README.md b/examples/pytorch/multi-model-text-analyzer/README.md index 907c739eb6..c423e60f08 100644 --- a/examples/pytorch/multi-model-text-analyzer/README.md +++ b/examples/pytorch/multi-model-text-analyzer/README.md @@ -1,5 +1,7 @@ # Multi-Model Analyzer API +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + This example deploys a sentiment analyzer and a text summarizer in one API. Query parameters are used for selecting the model. The example can be run on both CPU and on GPU hardware. diff --git a/examples/pytorch/multi-model-text-analyzer/cortex.yaml b/examples/pytorch/multi-model-text-analyzer/cortex.yaml index 252e5f303e..db6bab6ba6 100644 --- a/examples/pytorch/multi-model-text-analyzer/cortex.yaml +++ b/examples/pytorch/multi-model-text-analyzer/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: multi-model-text-analyzer kind: SyncAPI diff --git a/examples/pytorch/multi-model-text-analyzer/predictor.py b/examples/pytorch/multi-model-text-analyzer/predictor.py index bf7318f010..ea63d33b83 100644 --- a/examples/pytorch/multi-model-text-analyzer/predictor.py +++ b/examples/pytorch/multi-model-text-analyzer/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import torch from transformers import pipeline diff --git a/examples/pytorch/object-detector/README.md b/examples/pytorch/object-detector/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/object-detector/README.md +++ b/examples/pytorch/object-detector/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/object-detector/cortex.yaml b/examples/pytorch/object-detector/cortex.yaml index a51e1c720f..406025950c 100644 --- a/examples/pytorch/object-detector/cortex.yaml +++ b/examples/pytorch/object-detector/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: object-detector kind: SyncAPI diff --git a/examples/pytorch/object-detector/predictor.py b/examples/pytorch/object-detector/predictor.py index a559f78a9a..6024abd2b8 100644 --- a/examples/pytorch/object-detector/predictor.py +++ b/examples/pytorch/object-detector/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) from io import BytesIO diff --git a/examples/pytorch/reading-comprehender/README.md b/examples/pytorch/reading-comprehender/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/reading-comprehender/README.md +++ b/examples/pytorch/reading-comprehender/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/reading-comprehender/cortex.yaml b/examples/pytorch/reading-comprehender/cortex.yaml index af1754a5d3..e243586f63 100644 --- a/examples/pytorch/reading-comprehender/cortex.yaml +++ b/examples/pytorch/reading-comprehender/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: reading-comprehender kind: SyncAPI diff --git a/examples/pytorch/reading-comprehender/predictor.py b/examples/pytorch/reading-comprehender/predictor.py index e4c36f12ff..f3f99c4fdf 100644 --- a/examples/pytorch/reading-comprehender/predictor.py +++ b/examples/pytorch/reading-comprehender/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import torch from allennlp.predictors.predictor import Predictor as AllenNLPPredictor diff --git a/examples/pytorch/search-completer/README.md b/examples/pytorch/search-completer/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/search-completer/README.md +++ b/examples/pytorch/search-completer/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/search-completer/cortex.yaml b/examples/pytorch/search-completer/cortex.yaml index f386f3b518..ef20e9776c 100644 --- a/examples/pytorch/search-completer/cortex.yaml +++ b/examples/pytorch/search-completer/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: search-completer kind: SyncAPI diff --git a/examples/pytorch/search-completer/predictor.py b/examples/pytorch/search-completer/predictor.py index 6bb2f2bcb3..1ea8c7c84e 100644 --- a/examples/pytorch/search-completer/predictor.py +++ b/examples/pytorch/search-completer/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import torch import regex diff --git a/examples/pytorch/sentiment-analyzer/README.md b/examples/pytorch/sentiment-analyzer/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/sentiment-analyzer/README.md +++ b/examples/pytorch/sentiment-analyzer/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/sentiment-analyzer/cortex.yaml b/examples/pytorch/sentiment-analyzer/cortex.yaml index ed5c09626f..eed2e61713 100644 --- a/examples/pytorch/sentiment-analyzer/cortex.yaml +++ b/examples/pytorch/sentiment-analyzer/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: sentiment-analyzer kind: SyncAPI diff --git a/examples/pytorch/sentiment-analyzer/predictor.py b/examples/pytorch/sentiment-analyzer/predictor.py index ef509a64de..747f1c6fef 100644 --- a/examples/pytorch/sentiment-analyzer/predictor.py +++ b/examples/pytorch/sentiment-analyzer/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import torch from transformers import pipeline diff --git a/examples/pytorch/text-generator/README.md b/examples/pytorch/text-generator/README.md index deea87fad0..40530d489e 100644 --- a/examples/pytorch/text-generator/README.md +++ b/examples/pytorch/text-generator/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/pytorch/text-generator/cortex.yaml b/examples/pytorch/text-generator/cortex.yaml index 8a9c32728d..5983052371 100644 --- a/examples/pytorch/text-generator/cortex.yaml +++ b/examples/pytorch/text-generator/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: text-generator kind: SyncAPI diff --git a/examples/pytorch/text-generator/predictor.py b/examples/pytorch/text-generator/predictor.py index 0c7ad9d20e..85ed9380b9 100644 --- a/examples/pytorch/text-generator/predictor.py +++ b/examples/pytorch/text-generator/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import torch from transformers import GPT2Tokenizer, GPT2LMHeadModel diff --git a/examples/pytorch/text-summarizer/README.md b/examples/pytorch/text-summarizer/README.md index a5144d77e1..98040c110c 100644 --- a/examples/pytorch/text-summarizer/README.md +++ b/examples/pytorch/text-summarizer/README.md @@ -1,3 +1,5 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. Please refer [here](https://sshleifer.github.io/blog_v2/jupyter/2020/03/12/bart.html) to learn more about BART. diff --git a/examples/pytorch/text-summarizer/cortex.yaml b/examples/pytorch/text-summarizer/cortex.yaml index 70f5ee2f3c..9d1cff81da 100644 --- a/examples/pytorch/text-summarizer/cortex.yaml +++ b/examples/pytorch/text-summarizer/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: text-summarizer kind: SyncAPI diff --git a/examples/pytorch/text-summarizer/predictor.py b/examples/pytorch/text-summarizer/predictor.py index 2f611ba9f2..dc42cb2ae9 100644 --- a/examples/pytorch/text-summarizer/predictor.py +++ b/examples/pytorch/text-summarizer/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import torch from transformers import pipeline diff --git a/examples/sklearn/iris-classifier/README.md b/examples/sklearn/iris-classifier/README.md index dc3d1c0bcc..8154b60977 100644 --- a/examples/sklearn/iris-classifier/README.md +++ b/examples/sklearn/iris-classifier/README.md @@ -1,6 +1,6 @@ # Deploy models as Sync APIs -_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ This example shows how to deploy a classifier trained on the famous [iris data set](https://archive.ics.uci.edu/ml/datasets/iris) using scikit-learn. diff --git a/examples/sklearn/iris-classifier/batch-predictor.py b/examples/sklearn/iris-classifier/batch-predictor.py index 3de9f8a40b..8e18651204 100644 --- a/examples/sklearn/iris-classifier/batch-predictor.py +++ b/examples/sklearn/iris-classifier/batch-predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import os import boto3 diff --git a/examples/sklearn/iris-classifier/cortex.yaml b/examples/sklearn/iris-classifier/cortex.yaml index 46758c24ce..bd194f3654 100644 --- a/examples/sklearn/iris-classifier/cortex.yaml +++ b/examples/sklearn/iris-classifier/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: iris-classifier kind: SyncAPI diff --git a/examples/sklearn/iris-classifier/predictor.py b/examples/sklearn/iris-classifier/predictor.py index d3bbf19827..92741532e7 100644 --- a/examples/sklearn/iris-classifier/predictor.py +++ b/examples/sklearn/iris-classifier/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import os import boto3 diff --git a/examples/sklearn/iris-classifier/trainer.py b/examples/sklearn/iris-classifier/trainer.py index d14eb07208..79bdd49e56 100644 --- a/examples/sklearn/iris-classifier/trainer.py +++ b/examples/sklearn/iris-classifier/trainer.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import boto3 import pickle diff --git a/examples/sklearn/mpg-estimator/README.md b/examples/sklearn/mpg-estimator/README.md index deea87fad0..40530d489e 100644 --- a/examples/sklearn/mpg-estimator/README.md +++ b/examples/sklearn/mpg-estimator/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/sklearn/mpg-estimator/cortex.yaml b/examples/sklearn/mpg-estimator/cortex.yaml index df87e1775c..acf60fce04 100644 --- a/examples/sklearn/mpg-estimator/cortex.yaml +++ b/examples/sklearn/mpg-estimator/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: mpg-estimator kind: SyncAPI diff --git a/examples/sklearn/mpg-estimator/predictor.py b/examples/sklearn/mpg-estimator/predictor.py index ad693ce6e8..4c39a5976b 100644 --- a/examples/sklearn/mpg-estimator/predictor.py +++ b/examples/sklearn/mpg-estimator/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import boto3 from botocore import UNSIGNED diff --git a/examples/sklearn/mpg-estimator/trainer.py b/examples/sklearn/mpg-estimator/trainer.py index 90d6192f43..b5adcec767 100644 --- a/examples/sklearn/mpg-estimator/trainer.py +++ b/examples/sklearn/mpg-estimator/trainer.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import mlflow.sklearn import pandas as pd diff --git a/examples/spacy/entity-recognizer/README.md b/examples/spacy/entity-recognizer/README.md index deea87fad0..40530d489e 100644 --- a/examples/spacy/entity-recognizer/README.md +++ b/examples/spacy/entity-recognizer/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/spacy/entity-recognizer/cortex.yaml b/examples/spacy/entity-recognizer/cortex.yaml index 72de560530..4b5301f1cb 100644 --- a/examples/spacy/entity-recognizer/cortex.yaml +++ b/examples/spacy/entity-recognizer/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: entity-recognizer kind: SyncAPI diff --git a/examples/spacy/entity-recognizer/predictor.py b/examples/spacy/entity-recognizer/predictor.py index 74c5312c4a..13f9d57152 100644 --- a/examples/spacy/entity-recognizer/predictor.py +++ b/examples/spacy/entity-recognizer/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import spacy import subprocess diff --git a/examples/tensorflow/image-classifier-inception/README.md b/examples/tensorflow/image-classifier-inception/README.md index deea87fad0..40530d489e 100644 --- a/examples/tensorflow/image-classifier-inception/README.md +++ b/examples/tensorflow/image-classifier-inception/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/tensorflow/image-classifier-inception/cortex.yaml b/examples/tensorflow/image-classifier-inception/cortex.yaml index 5e4fd78f76..8e63517445 100644 --- a/examples/tensorflow/image-classifier-inception/cortex.yaml +++ b/examples/tensorflow/image-classifier-inception/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-inception kind: SyncAPI diff --git a/examples/tensorflow/image-classifier-inception/cortex_server_side_batching.yaml b/examples/tensorflow/image-classifier-inception/cortex_server_side_batching.yaml index 98b5845414..109ea4a91e 100644 --- a/examples/tensorflow/image-classifier-inception/cortex_server_side_batching.yaml +++ b/examples/tensorflow/image-classifier-inception/cortex_server_side_batching.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-inception kind: SyncAPI diff --git a/examples/tensorflow/image-classifier-inception/inception.ipynb b/examples/tensorflow/image-classifier-inception/inception.ipynb index 547d6dbe20..e5b4045fb1 100644 --- a/examples/tensorflow/image-classifier-inception/inception.ipynb +++ b/examples/tensorflow/image-classifier-inception/inception.ipynb @@ -31,7 +31,7 @@ "source": [ "# Exporting ImageNet Inception\n", "\n", - "_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_\n", + "_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_\n", "\n", "In this notebook, we'll show how to export the [pre-trained Imagenet Inception model](https://tfhub.dev/google/imagenet/inception_v3/classification/3) for serving." ] diff --git a/examples/tensorflow/image-classifier-inception/predictor.py b/examples/tensorflow/image-classifier-inception/predictor.py index 7322a88bb6..68e6aa8baa 100644 --- a/examples/tensorflow/image-classifier-inception/predictor.py +++ b/examples/tensorflow/image-classifier-inception/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import requests import numpy as np diff --git a/examples/tensorflow/image-classifier-resnet50/README.md b/examples/tensorflow/image-classifier-resnet50/README.md index 9e295736a6..fb4194c199 100644 --- a/examples/tensorflow/image-classifier-resnet50/README.md +++ b/examples/tensorflow/image-classifier-resnet50/README.md @@ -1,5 +1,7 @@ # Image Classifier with ResNet50 +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + This example implements an image recognition system using ResNet50, which allows for the recognition of up to 1000 classes. ## Deploying diff --git a/examples/tensorflow/image-classifier-resnet50/cortex.yaml b/examples/tensorflow/image-classifier-resnet50/cortex.yaml index a970b2d08d..977caac07a 100644 --- a/examples/tensorflow/image-classifier-resnet50/cortex.yaml +++ b/examples/tensorflow/image-classifier-resnet50/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-resnet50 kind: SyncAPI diff --git a/examples/tensorflow/image-classifier-resnet50/cortex_gpu.yaml b/examples/tensorflow/image-classifier-resnet50/cortex_gpu.yaml index faa2bfc836..e4c3329d37 100644 --- a/examples/tensorflow/image-classifier-resnet50/cortex_gpu.yaml +++ b/examples/tensorflow/image-classifier-resnet50/cortex_gpu.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-resnet50 kind: SyncAPI diff --git a/examples/tensorflow/image-classifier-resnet50/cortex_gpu_server_side_batching.yaml b/examples/tensorflow/image-classifier-resnet50/cortex_gpu_server_side_batching.yaml index de37ded104..412b12729c 100644 --- a/examples/tensorflow/image-classifier-resnet50/cortex_gpu_server_side_batching.yaml +++ b/examples/tensorflow/image-classifier-resnet50/cortex_gpu_server_side_batching.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-resnet50 kind: SyncAPI diff --git a/examples/tensorflow/image-classifier-resnet50/cortex_inf.yaml b/examples/tensorflow/image-classifier-resnet50/cortex_inf.yaml index 528ff856a3..748dbd4f5d 100644 --- a/examples/tensorflow/image-classifier-resnet50/cortex_inf.yaml +++ b/examples/tensorflow/image-classifier-resnet50/cortex_inf.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-resnet50 kind: SyncAPI diff --git a/examples/tensorflow/image-classifier-resnet50/cortex_inf_server_side_batching.yaml b/examples/tensorflow/image-classifier-resnet50/cortex_inf_server_side_batching.yaml index d67bddec4c..6cce40dd8d 100644 --- a/examples/tensorflow/image-classifier-resnet50/cortex_inf_server_side_batching.yaml +++ b/examples/tensorflow/image-classifier-resnet50/cortex_inf_server_side_batching.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: image-classifier-resnet50 kind: SyncAPI diff --git a/examples/tensorflow/image-classifier-resnet50/generate_gpu_resnet50_model.ipynb b/examples/tensorflow/image-classifier-resnet50/generate_gpu_resnet50_model.ipynb index 38149b1a69..ea29404516 100644 --- a/examples/tensorflow/image-classifier-resnet50/generate_gpu_resnet50_model.ipynb +++ b/examples/tensorflow/image-classifier-resnet50/generate_gpu_resnet50_model.ipynb @@ -6,7 +6,7 @@ "source": [ "# Generate GPU Resnet50 Model\n", "\n", - "_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_" + "_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_" ] }, { diff --git a/examples/tensorflow/image-classifier-resnet50/generate_resnet50_models.ipynb b/examples/tensorflow/image-classifier-resnet50/generate_resnet50_models.ipynb index 29a9a7d287..fb4f685030 100644 --- a/examples/tensorflow/image-classifier-resnet50/generate_resnet50_models.ipynb +++ b/examples/tensorflow/image-classifier-resnet50/generate_resnet50_models.ipynb @@ -6,7 +6,7 @@ "source": [ "# Generate Resnet50 Models\n", "\n", - "_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_" + "_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_" ] }, { diff --git a/examples/tensorflow/image-classifier-resnet50/predictor.py b/examples/tensorflow/image-classifier-resnet50/predictor.py index 30c873a8bb..a294fb4424 100644 --- a/examples/tensorflow/image-classifier-resnet50/predictor.py +++ b/examples/tensorflow/image-classifier-resnet50/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import os import cv2 diff --git a/examples/tensorflow/iris-classifier/README.md b/examples/tensorflow/iris-classifier/README.md index deea87fad0..40530d489e 100644 --- a/examples/tensorflow/iris-classifier/README.md +++ b/examples/tensorflow/iris-classifier/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/tensorflow/iris-classifier/cortex.yaml b/examples/tensorflow/iris-classifier/cortex.yaml index 964932a062..17caa5eefe 100644 --- a/examples/tensorflow/iris-classifier/cortex.yaml +++ b/examples/tensorflow/iris-classifier/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: iris-classifier kind: SyncAPI diff --git a/examples/tensorflow/iris-classifier/predictor.py b/examples/tensorflow/iris-classifier/predictor.py index c880d2233f..d8de5facb6 100644 --- a/examples/tensorflow/iris-classifier/predictor.py +++ b/examples/tensorflow/iris-classifier/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) labels = ["setosa", "versicolor", "virginica"] diff --git a/examples/tensorflow/iris-classifier/tensorflow.ipynb b/examples/tensorflow/iris-classifier/tensorflow.ipynb index f3e3dfad34..edb38dd3e9 100644 --- a/examples/tensorflow/iris-classifier/tensorflow.ipynb +++ b/examples/tensorflow/iris-classifier/tensorflow.ipynb @@ -31,7 +31,7 @@ "source": [ "# Training an Iris classifier using TensorFlow\n", "\n", - "_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_\n", + "_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_\n", "\n", "In this notebook, we'll show how to train a classifier trained on the [iris data set](https://archive.ics.uci.edu/ml/datasets/iris) using TensorFlow." ] diff --git a/examples/tensorflow/license-plate-reader/README.md b/examples/tensorflow/license-plate-reader/README.md index d7ff404a65..6337148574 100644 --- a/examples/tensorflow/license-plate-reader/README.md +++ b/examples/tensorflow/license-plate-reader/README.md @@ -1,5 +1,7 @@ # Real-Time License Plate Identification System +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + This project implements a license plate identification system. On resource-constrained systems, running inferences may prove to be too computationally expensive. One solution is to run the ML in the cloud and have the local (embedded) system act as a client of these services. ![Demo GIF](https://i.imgur.com/jgkJB59.gif) diff --git a/examples/tensorflow/license-plate-reader/cortex_full.yaml b/examples/tensorflow/license-plate-reader/cortex_full.yaml index 4f4a667800..486dc000df 100644 --- a/examples/tensorflow/license-plate-reader/cortex_full.yaml +++ b/examples/tensorflow/license-plate-reader/cortex_full.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: yolov3 kind: SyncAPI diff --git a/examples/tensorflow/license-plate-reader/cortex_lite.yaml b/examples/tensorflow/license-plate-reader/cortex_lite.yaml index 8db4385211..f818e88e24 100644 --- a/examples/tensorflow/license-plate-reader/cortex_lite.yaml +++ b/examples/tensorflow/license-plate-reader/cortex_lite.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: license-plate-reader kind: SyncAPI diff --git a/examples/tensorflow/license-plate-reader/predictor_crnn.py b/examples/tensorflow/license-plate-reader/predictor_crnn.py index 16a9870f80..7b2d9e3bec 100644 --- a/examples/tensorflow/license-plate-reader/predictor_crnn.py +++ b/examples/tensorflow/license-plate-reader/predictor_crnn.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import cv2 import numpy as np diff --git a/examples/tensorflow/license-plate-reader/predictor_lite.py b/examples/tensorflow/license-plate-reader/predictor_lite.py index 30d1a1b2a1..0a85906453 100644 --- a/examples/tensorflow/license-plate-reader/predictor_lite.py +++ b/examples/tensorflow/license-plate-reader/predictor_lite.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import boto3, base64, cv2, re, os, requests, json import keras_ocr diff --git a/examples/tensorflow/license-plate-reader/predictor_yolo.py b/examples/tensorflow/license-plate-reader/predictor_yolo.py index 12f9610658..8a5aa5c1cf 100644 --- a/examples/tensorflow/license-plate-reader/predictor_yolo.py +++ b/examples/tensorflow/license-plate-reader/predictor_yolo.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import json import base64 diff --git a/examples/tensorflow/license-plate-reader/sample_inference.py b/examples/tensorflow/license-plate-reader/sample_inference.py index 2b69521f45..0fff18ff15 100644 --- a/examples/tensorflow/license-plate-reader/sample_inference.py +++ b/examples/tensorflow/license-plate-reader/sample_inference.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import click, cv2, requests, pickle, base64, json import numpy as np diff --git a/examples/tensorflow/license-plate-reader/utils/__init__.py b/examples/tensorflow/license-plate-reader/utils/__init__.py index 6a2382d026..9ca827251a 100644 --- a/examples/tensorflow/license-plate-reader/utils/__init__.py +++ b/examples/tensorflow/license-plate-reader/utils/__init__.py @@ -1 +1 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) diff --git a/examples/tensorflow/license-plate-reader/utils/bbox.py b/examples/tensorflow/license-plate-reader/utils/bbox.py index 8322c696d5..a56cbbc990 100644 --- a/examples/tensorflow/license-plate-reader/utils/bbox.py +++ b/examples/tensorflow/license-plate-reader/utils/bbox.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import numpy as np import cv2 diff --git a/examples/tensorflow/license-plate-reader/utils/colors.py b/examples/tensorflow/license-plate-reader/utils/colors.py index d392a6ee95..4bf106d94c 100644 --- a/examples/tensorflow/license-plate-reader/utils/colors.py +++ b/examples/tensorflow/license-plate-reader/utils/colors.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) def get_color(label): diff --git a/examples/tensorflow/license-plate-reader/utils/preprocess.py b/examples/tensorflow/license-plate-reader/utils/preprocess.py index 7382b22774..fe02da1c71 100644 --- a/examples/tensorflow/license-plate-reader/utils/preprocess.py +++ b/examples/tensorflow/license-plate-reader/utils/preprocess.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import numpy as np import cv2, requests diff --git a/examples/tensorflow/license-plate-reader/utils/utils.py b/examples/tensorflow/license-plate-reader/utils/utils.py index 8b5a2a7290..63017b4629 100644 --- a/examples/tensorflow/license-plate-reader/utils/utils.py +++ b/examples/tensorflow/license-plate-reader/utils/utils.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import cv2 import numpy as np diff --git a/examples/tensorflow/multi-model-classifier/README.md b/examples/tensorflow/multi-model-classifier/README.md index 61334ee155..c5878dc260 100644 --- a/examples/tensorflow/multi-model-classifier/README.md +++ b/examples/tensorflow/multi-model-classifier/README.md @@ -1,5 +1,7 @@ # Multi-Model Classifier API +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + This example deploys Iris, ResNet50 and Inception models in one API. Query parameters are used for selecting the model. The example can be run on both CPU and on GPU hardware. diff --git a/examples/tensorflow/multi-model-classifier/cortex.yaml b/examples/tensorflow/multi-model-classifier/cortex.yaml index 7ee7c8b029..9f7c114fe6 100644 --- a/examples/tensorflow/multi-model-classifier/cortex.yaml +++ b/examples/tensorflow/multi-model-classifier/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: multi-model-classifier kind: SyncAPI diff --git a/examples/tensorflow/multi-model-classifier/predictor.py b/examples/tensorflow/multi-model-classifier/predictor.py index 9eb58c2e4d..5641a816a5 100644 --- a/examples/tensorflow/multi-model-classifier/predictor.py +++ b/examples/tensorflow/multi-model-classifier/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import requests import numpy as np diff --git a/examples/tensorflow/sentiment-analyzer/README.md b/examples/tensorflow/sentiment-analyzer/README.md index deea87fad0..40530d489e 100644 --- a/examples/tensorflow/sentiment-analyzer/README.md +++ b/examples/tensorflow/sentiment-analyzer/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/tensorflow/sentiment-analyzer/bert.ipynb b/examples/tensorflow/sentiment-analyzer/bert.ipynb index f9d951f1b7..f9a3c63d2a 100644 --- a/examples/tensorflow/sentiment-analyzer/bert.ipynb +++ b/examples/tensorflow/sentiment-analyzer/bert.ipynb @@ -50,7 +50,7 @@ "source": [ "#Predicting Movie Review Sentiment with BERT on TF Hub", "\n", - "_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_\n", + "_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_\n", "\n" ] }, diff --git a/examples/tensorflow/sentiment-analyzer/cortex.yaml b/examples/tensorflow/sentiment-analyzer/cortex.yaml index ea23ccfbc3..a62481fba5 100644 --- a/examples/tensorflow/sentiment-analyzer/cortex.yaml +++ b/examples/tensorflow/sentiment-analyzer/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: sentiment-analyzer kind: SyncAPI diff --git a/examples/tensorflow/sentiment-analyzer/predictor.py b/examples/tensorflow/sentiment-analyzer/predictor.py index d04ccad88f..1aaa601edc 100644 --- a/examples/tensorflow/sentiment-analyzer/predictor.py +++ b/examples/tensorflow/sentiment-analyzer/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import tensorflow as tf import tensorflow_hub as hub diff --git a/examples/tensorflow/text-generator/README.md b/examples/tensorflow/text-generator/README.md index deea87fad0..40530d489e 100644 --- a/examples/tensorflow/text-generator/README.md +++ b/examples/tensorflow/text-generator/README.md @@ -1 +1,3 @@ +_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_ + Please refer to the [tutorial](https://docs.cortex.dev/iris-classifier) to see how to deploy an example with Cortex. diff --git a/examples/tensorflow/text-generator/cortex.yaml b/examples/tensorflow/text-generator/cortex.yaml index 2bfb98bef2..039fe6077d 100644 --- a/examples/tensorflow/text-generator/cortex.yaml +++ b/examples/tensorflow/text-generator/cortex.yaml @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) - name: text-generator kind: SyncAPI diff --git a/examples/tensorflow/text-generator/encoder.py b/examples/tensorflow/text-generator/encoder.py index e6c3ed06be..e0a9b8f8d3 100644 --- a/examples/tensorflow/text-generator/encoder.py +++ b/examples/tensorflow/text-generator/encoder.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) # This file includes code which was modified from https://github.com/openai/gpt-2 diff --git a/examples/tensorflow/text-generator/gpt-2.ipynb b/examples/tensorflow/text-generator/gpt-2.ipynb index 725492c4a7..88e9f149d1 100644 --- a/examples/tensorflow/text-generator/gpt-2.ipynb +++ b/examples/tensorflow/text-generator/gpt-2.ipynb @@ -31,7 +31,7 @@ "source": [ "# Exporting GPT-2\n", "\n", - "_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_\n", + "_WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub)_\n", "\n", "In this notebook, we'll show how to export [OpenAI's GPT-2 text generation model](https://github.com/openai/gpt-2) for serving." ] diff --git a/examples/tensorflow/text-generator/predictor.py b/examples/tensorflow/text-generator/predictor.py index 3840d23d11..26d37cc8e0 100644 --- a/examples/tensorflow/text-generator/predictor.py +++ b/examples/tensorflow/text-generator/predictor.py @@ -1,4 +1,4 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` +# WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.18.*, run `git checkout -b 0.18` or switch to the `0.18` branch on GitHub) import os import boto3 diff --git a/examples/utils/throughput_test.py b/examples/utils/throughput_test.py index 79da436559..fa1b29531a 100644 --- a/examples/utils/throughput_test.py +++ b/examples/utils/throughput_test.py @@ -1,5 +1,3 @@ -# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version` - import os import sys import click