You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: build/lint.sh
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -153,11 +153,12 @@ else
153
153
154
154
# Check for version warning comments in examples
155
155
output=$(cd "$ROOT/examples"&& find . -type f \
156
-
! -name "README.md" \
156
+
! -path "./README.md" \
157
+
! -path "./utils/*" \
157
158
! -name "*.json" \
158
159
! -name "*.txt" \
159
160
! -name ".*" \
160
-
-exec grep -L "WARNING: you are on the master branch, please refer to the examples on the branch that matches your \`cortex version\`" {} \;)
161
+
-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)" {} \;)
161
162
if [[ $output ]];then
162
163
echo"example file(s) are missing version appropriate comment:"
echo"error: use \`./dev/update_version_comments.sh <minor_version>\` to update all docs and examples warnings"
37
+
exit 1
38
+
fi
39
+
40
+
if [[ "$OSTYPE"=="darwin"* ]];then
41
+
cd"$ROOT"&& find . -type f \
42
+
! -path "./build/lint.sh" \
43
+
! -path "./dev/update_version_comments.sh" \
44
+
! -path "./vendor/*" \
45
+
! -path "./bin/*" \
46
+
! -path "./.git/*" \
47
+
! -name ".*" \
48
+
-print0 | \
49
+
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)/"
50
+
else
51
+
cd"$ROOT"&& find . -type f \
52
+
! -path "./build/lint.sh" \
53
+
! -path "./dev/update_version_comments.sh" \
54
+
! -path "./vendor/*" \
55
+
! -path "./bin/*" \
56
+
! -path "./.git/*" \
57
+
! -name ".*" \
58
+
-print0 | \
59
+
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)/"
echo"error: this is meant to be run on release branches"
29
68
exit 1
@@ -60,7 +99,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
60
99
! -path "./.git/*" \
61
100
! -name ".*" \
62
101
-print0 | \
63
-
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/"
102
+
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/"
64
103
else
65
104
cd"$ROOT"&& find . -type f \
66
105
! -path "./build/lint.sh" \
@@ -70,7 +109,7 @@ else
70
109
! -path "./.git/*" \
71
110
! -name ".*" \
72
111
-print0 | \
73
-
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/"
112
+
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/"
Copy file name to clipboardExpand all lines: examples/apisplitter/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Splitting traffic between APIs
2
2
3
-
_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_
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)_
4
4
5
5
This example shows how to split traffic between 2 different iris-classifiers deployed as SyncAPIs.
Copy file name to clipboardExpand all lines: examples/apisplitter/cortex.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`
1
+
# 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)
Copy file name to clipboardExpand all lines: examples/apisplitter/onnx_predictor.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`
1
+
# 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)
Copy file name to clipboardExpand all lines: examples/apisplitter/tensorflow_predictor.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`
1
+
# 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)
Copy file name to clipboardExpand all lines: examples/batch/image-classifier/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Deploy models as Batch APIs
2
2
3
-
_WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`_
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)_
4
4
5
5
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.
Copy file name to clipboardExpand all lines: examples/batch/image-classifier/cortex.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`
1
+
# 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)
Copy file name to clipboardExpand all lines: examples/batch/image-classifier/predictor.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# WARNING: you are on the master branch, please refer to the examples on the branch that matches your `cortex version`
1
+
# 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)
You can deploy this example by cloning this repo with `git clone -b v<CORTEX_VERSION> https://github.com/cortexlabs/cortex`. The `<CORTEX_VERSION>` 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.
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)_
4
4
5
5
<!-- CORTEX_VERSION_MINOR -->
6
6
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.
0 commit comments