Skip to content

Commit 549ab86

Browse files
nv-kmcgill53mc-nv
authored andcommitted
Skip testing JAX example for Jetson (#5012)
* skipping JAX example test
1 parent 86427d6 commit 549ab86

File tree

1 file changed

+32
-27
lines changed
  • qa/L0_backend_python/examples

1 file changed

+32
-27
lines changed

qa/L0_backend_python/examples/test.sh

+32-27
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ if [ "$TEST_JETSON" == "0" ]; then
4343
pip3 uninstall -y torch
4444
pip3 install torch==1.9.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html
4545
fi
46+
4647
# Install JAX
47-
pip3 install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
48+
if [ "$TEST_JETSON" == "0" ]; then
49+
pip3 install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
50+
fi
4851

4952
git clone https://github.com/triton-inference-server/python_backend -b $PYTHON_BACKEND_REPO_TAG
5053
cd python_backend
@@ -112,35 +115,37 @@ wait $SERVER_PID
112115
# Example 3
113116

114117
# JAX AddSub
115-
CLIENT_LOG="./jax_client.log"
116-
mkdir -p models/jax/1/
117-
cp examples/jax/model.py models/jax/1/model.py
118-
cp examples/jax/config.pbtxt models/jax/config.pbtxt
119-
run_server
120-
if [ "$SERVER_PID" == "0" ]; then
121-
echo -e "\n***\n*** Failed to start $SERVER\n***"
122-
cat $SERVER_LOG
123-
RET=1
124-
fi
125-
126-
set +e
127-
python3 examples/jax/client.py > $CLIENT_LOG
128-
if [ $? -ne 0 ]; then
129-
echo -e "\n***\n*** Failed to verify jax example. \n***"
130-
RET=1
131-
fi
118+
# JAX is not supported on Jetson
119+
if [ "$TEST_JETSON" == "0" ]; then
120+
CLIENT_LOG="./jax_client.log"
121+
mkdir -p models/jax/1/
122+
cp examples/jax/model.py models/jax/1/model.py
123+
cp examples/jax/config.pbtxt models/jax/config.pbtxt
124+
run_server
125+
if [ "$SERVER_PID" == "0" ]; then
126+
echo -e "\n***\n*** Failed to start $SERVER\n***"
127+
cat $SERVER_LOG
128+
RET=1
129+
fi
132130

133-
grep "PASS" $CLIENT_LOG
134-
if [ $? -ne 0 ]; then
135-
echo -e "\n***\n*** Failed to verify jax example. \n***"
136-
cat $CLIENT_LOG
137-
RET=1
138-
fi
139-
set -e
131+
set +e
132+
python3 examples/jax/client.py > $CLIENT_LOG
133+
if [ $? -ne 0 ]; then
134+
echo -e "\n***\n*** Failed to verify jax example. \n***"
135+
RET=1
136+
fi
140137

141-
kill $SERVER_PID
142-
wait $SERVER_PID
138+
grep "PASS" $CLIENT_LOG
139+
if [ $? -ne 0 ]; then
140+
echo -e "\n***\n*** Failed to verify jax example. \n***"
141+
cat $CLIENT_LOG
142+
RET=1
143+
fi
144+
set -e
143145

146+
kill $SERVER_PID
147+
wait $SERVER_PID
148+
fi
144149

145150
# Example 4
146151

0 commit comments

Comments
 (0)