Skip to content

Commit

Permalink
Fix XPU serving test (#435)
Browse files Browse the repository at this point in the history
Signed-off-by: Srikanth Ramakrishna <[email protected]>
  • Loading branch information
sramakintel authored Oct 3, 2024
1 parent bd684bc commit 79ec35e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions pytorch/serving/model-archive/mar-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

if [[ "$1" == "cpu" ]]; then
wget https://download.pytorch.org/models/squeezenet1_1-b8a52dc0.pth
torch-model-archiver --model-name squeezenet1_1 --version 1.1 --model-file /home/model-server/model-archive/model.py --serialized-file squeezenet1_1-b8a52dc0.pth --handler image_classifier --export-path /home/model-server/model-store
torch-model-archiver --model-name squeezenet1_1 --version 1.1 --model-file /home/model-server/model-archive/model.py --serialized-file squeezenet1_1-b8a52dc0.pth --handler image_classifier --export-path /home/model-server/model-store --force
rm -rf squeezenet1_1-b8a52dc0.pth
elif [[ "$1" == "xpu" ]]; then
python /home/model-server/model-archive/ipex_squeezenet.py
torch-model-archiver --model-name squeezenet1_1 --version 1.1 --serialized-file squeezenet1_1-jit.pt --handler image_classifier --export-path /home/model-server/model-store
torch-model-archiver --model-name squeezenet1_1 --version 1.1 --serialized-file squeezenet1_1-jit.pt --handler image_classifier --export-path /home/model-server/model-store --force
rm -rf squeezenet1_1-jit.pt
else
echo "Only cpu and xpu devices supported"
Expand Down
44 changes: 22 additions & 22 deletions pytorch/serving/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ ipex-serving-cpu-model-archive:
dst: /home/model-server/model-store
user: root
workdir: /home/model-server/model-archive
ipex-serving-xpu-model-archive:
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-xpu
cmd: /home/model-server/model-archive/mar-test.sh xpu
entrypoint: /bin/bash
device: ["/dev/dri"]
volumes:
- src: $PWD/pytorch/serving/model-archive
dst: /home/model-server/model-archive
- src: $PWD/pytorch/serving/model-store
dst: /home/model-server/model-store
user: root
workdir: /home/model-server/model-archive
ipex-serving-cpu-workflow-archive:
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-cpu
cmd: /home/model-server/model-archive/war-test.sh
Expand All @@ -58,11 +46,10 @@ ipex-serving-cpu-rest-workflow:
env:
ENABLE_TORCH_PROFILER: 'true'
shm_size: 1g
ipex-serving-xpu-rest-workflow:
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-xpu
cmd: bash /home/model-server/wf-store/rest-test.sh
ipex-serving-cpu-rest-inference:
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-cpu
cmd: bash /home/model-server/model-store/rest-test.sh
serving: True
device: ["/dev/dri"]
volumes:
- src: $PWD/pytorch/serving/model-store
dst: /home/model-server/model-store
Expand All @@ -71,10 +58,10 @@ ipex-serving-xpu-rest-workflow:
env:
ENABLE_TORCH_PROFILER: 'true'
shm_size: 1g
workdir: /home/model-server/wf-store
ipex-serving-cpu-rest-inference:
workdir: /home/model-server/model-store
ipex-serving-cpu-grpc-inference:
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-cpu
cmd: bash /home/model-server/model-store/rest-test.sh
cmd: bash /home/model-server/model-store/grpc-test.sh
serving: True
volumes:
- src: $PWD/pytorch/serving/model-store
Expand All @@ -85,10 +72,23 @@ ipex-serving-cpu-rest-inference:
ENABLE_TORCH_PROFILER: 'true'
shm_size: 1g
workdir: /home/model-server/model-store
ipex-serving-cpu-grpc-inference:
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-cpu
cmd: bash /home/model-server/model-store/grpc-test.sh
ipex-serving-xpu-model-archive:
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-xpu
cmd: /home/model-server/model-archive/mar-test.sh xpu
entrypoint: /bin/bash
device: ["/dev/dri"]
volumes:
- src: $PWD/pytorch/serving/model-archive
dst: /home/model-server/model-archive
- src: $PWD/pytorch/serving/model-store
dst: /home/model-server/model-store
user: root
workdir: /home/model-server/model-archive
ipex-serving-xpu-rest-inference:
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-xpu
cmd: bash /home/model-server/model-store/rest-test.sh
serving: True
device: ["/dev/dri"]
volumes:
- src: $PWD/pytorch/serving/model-store
dst: /home/model-server/model-store
Expand Down

0 comments on commit 79ec35e

Please sign in to comment.