diff --git a/pytorch/serving/model-archive/mar-test.sh b/pytorch/serving/model-archive/mar-test.sh index aabee71f..76f9550e 100644 --- a/pytorch/serving/model-archive/mar-test.sh +++ b/pytorch/serving/model-archive/mar-test.sh @@ -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" diff --git a/pytorch/serving/tests.yaml b/pytorch/serving/tests.yaml index 986e220a..4347400b 100644 --- a/pytorch/serving/tests.yaml +++ b/pytorch/serving/tests.yaml @@ -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 @@ -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 @@ -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 @@ -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