Skip to content

Commit

Permalink
IG response code. (kserve#3039)
Browse files Browse the repository at this point in the history
* First commit

Signed-off-by: rachitchauhan43 <[email protected]>

* Removing unused code

Signed-off-by: rachitchauhan43 <[email protected]>

* Added handling for ensemble use case

Signed-off-by: rachitchauhan43 <[email protected]>

* Bumping up resources for ISVCs to come up quickly

Signed-off-by: rachitchauhan43 <[email protected]>

* Using latest version of controller-gen

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding in testing resources

Signed-off-by: rachitchauhan43 <[email protected]>

* Reverting res req and limits

Signed-off-by: rachitchauhan43 <[email protected]>

* Enabling live logging for pytest to enable logs to prin to cli for easier debugging

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding images build step in e2e tests.

Signed-off-by: rachitchauhan43 <[email protected]>

* Fixing test to use service_name

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding build of router image to use latest router image everytime for tests

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding router enrty for kserve deps setup to update router for IGs

Signed-off-by: rachitchauhan43 <[email protected]>

* Fixed linting errors

Signed-off-by: rachitchauhan43 <[email protected]>

* Asserting in pythonic way

Signed-off-by: rachitchauhan43 <[email protected]>

* Updating kserve version to 0.11.0

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding more e2e tests

Signed-off-by: rachitchauhan43 <[email protected]>

* Some refactoring to run tests locally easily

Signed-off-by: rachitchauhan43 <[email protected]>

* Adding some test deps and adding more tests

Signed-off-by: rachitchauhan43 <[email protected]>

* Fixing a bug and Adding tests for switch use cases

Signed-off-by: rachitchauhan43 <[email protected]>

* Fixing a bug in e2e-test script

Signed-off-by: rachitchauhan43 <[email protected]>

* Added e2e test cases for ensemble.

Signed-off-by: rachitchauhan43 <[email protected]>

* Reducing parallelism to avoid pressure on minikube and timeouts

Signed-off-by: rachitchauhan43 <[email protected]>

* Bump up timeout interval for the action.

Signed-off-by: rachitchauhan43 <[email protected]>

* Bump up timeout interval for the test_triton_runtime_with_transformer as this ISVC has both predictor and transformer that needs to come up and it fails sometime with ISVC Timeout error.

Signed-off-by: rachitchauhan43 <[email protected]>

* Running path-based routing tests as their own job

Signed-off-by: rachitchauhan43 <[email protected]>

* Moved path-based-routing test as it's own job

Signed-off-by: rachitchauhan43 <[email protected]>

* Reducing parallelism to 2

Signed-off-by: rachitchauhan43 <[email protected]>

* Reducing parallelism to 2 for test-fast job and increasing timeout for job as well as new tests have been added

Signed-off-by: rachitchauhan43 <[email protected]>

* Update test/e2e/graph/test-resources/ig_test_ensemble_scenario_7.yaml

Co-authored-by: Dan Sun <[email protected]>
Signed-off-by: Rachit Chauhan <[email protected]

* Removing parallelism and bumping up timeout to 120 mins to avoid resource contention issues.

Signed-off-by: rachitchauhan43 <[email protected]>

---------

Signed-off-by: rachitchauhan43 <[email protected]>
Signed-off-by: Rachit Chauhan <[email protected]>
Co-authored-by: Dan Sun <[email protected]>
  • Loading branch information
rachitchauhan43 and yuzisun authored Sep 10, 2023
1 parent 29e3515 commit a73c949
Show file tree
Hide file tree
Showing 38 changed files with 6,300 additions and 198 deletions.
5 changes: 5 additions & 0 deletions .github/actions/base-download/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ runs:
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/storage-initializer:${{ github.sha }}"

- name: Download router image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/router:${{ github.sha }}"
148 changes: 142 additions & 6 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
with:
image: "kserve/storage-initializer:${{ github.sha }}"

- name: Upload router image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "kserve/router:${{ github.sha }}"

poetry-check:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -110,7 +115,7 @@ jobs:
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "kserve/custom-image-transformer-grpc:${{ github.sha }}"

explainer-runtime-build:
runs-on: ubuntu-latest
needs: [poetry-check]
Expand All @@ -133,9 +138,33 @@ jobs:
with:
image: "kserve/art-explainer:${{ github.sha }}"

graph-tests-images-build:
runs-on: ubuntu-latest
needs: [ poetry-check ]
steps:
- uses: actions/checkout@v3

- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Build test images needed for graph tests
run: |
./test/scripts/gh-actions/build-graph-tests-images.sh
docker image ls
- name: Upload success_200_isvc predictor image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "kserve/success-200-isvc:${{ github.sha }}"

- name: Upload error_404_isvc predictor image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "kserve/error-404-isvc:${{ github.sha }}"

test-fast:
runs-on: ubuntu-latest
needs: [kserve-image-build, predictor-runtime-build, explainer-runtime-build]
needs: [kserve-image-build, predictor-runtime-build, explainer-runtime-build, graph-tests-images-build]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -187,6 +216,16 @@ jobs:
with:
image: "kserve/image-transformer:${{ github.sha }}"

- name: Download success_200_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/success-200-isvc:${{ github.sha }}"

- name: Download error_404_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/error-404-isvc:${{ github.sha }}"

- name: Install Poetry and version plugin
run: ./test/scripts/gh-actions/setup-poetry.sh

Expand All @@ -197,13 +236,100 @@ jobs:
kubectl get pods -n kserve
kubectl describe pods -n kserve
- name: Run E2E tests
- name: Run all E2E tests except graph
timeout-minutes: 60
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "fast or pmml or graph"
./test/scripts/gh-actions/run-e2e-tests.sh "fast or pmml"
kubectl get pods -n kserve
- name: Run E2E tests for graph
timeout-minutes: 120
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "graph" "2"
kubectl get pods -n kserve
- name: Check system status
if: always()
run: |
./test/scripts/gh-actions/status-check.sh
test-path-based-routing:
runs-on: ubuntu-latest
needs: [ kserve-image-build, predictor-runtime-build, explainer-runtime-build, graph-tests-images-build ]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Setup Minikube
uses: ./.github/actions/minikube-setup

- name: Download base images
uses: ./.github/actions/base-download

- name: KServe dependency setup
uses: ./.github/actions/kserve-dep-setup

- name: Download sklearn server image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/sklearnserver:${{ github.sha }}"

- name: Download xgb server image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/xgbserver:${{ github.sha }}"

- name: Download lgb server image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/lgbserver:${{ github.sha }}"

- name: Download pmml image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/pmmlserver:${{ github.sha }}"

- name: Download transformer image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/image-transformer:${{ github.sha }}"

- name: Download success_200_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/success-200-isvc:${{ github.sha }}"

- name: Download error_404_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/error-404-isvc:${{ github.sha }}"

- name: Install Poetry and version plugin
run: ./test/scripts/gh-actions/setup-poetry.sh

- name: Install KServe
run: |
./test/scripts/gh-actions/setup-kserve.sh
kubectl get pods -n kserve
kubectl describe pods -n kserve
- name: Patch inferenceservice config
run : |
kubectl patch configmaps -n kserve inferenceservice-config --patch-file config/overlays/test/configmap/inferenceservice-ingress.yaml
Expand Down Expand Up @@ -587,7 +713,7 @@ jobs:
test-kourier:
runs-on: ubuntu-latest
needs: [kserve-image-build, predictor-runtime-build]
needs: [kserve-image-build, predictor-runtime-build, graph-tests-images-build]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand All @@ -614,6 +740,16 @@ jobs:
with:
image: "kserve/xgbserver:${{ github.sha }}"

- name: Download success_200_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/success-200-isvc:${{ github.sha }}"

- name: Download error_404_isvc predictor image
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "kserve/error-404-isvc:${{ github.sha }}"

- name: Install Poetry and version plugin
run: ./test/scripts/gh-actions/setup-poetry.sh

Expand All @@ -630,7 +766,7 @@ jobs:
kubectl describe configmaps -n kserve inferenceservice-config
- name: Run E2E tests
timeout-minutes: 25
timeout-minutes: 120
run: |
export KSERVE_INGRESS_HOST_PORT=$(kubectl get pod -n knative-serving -l "app=3scale-kourier-gateway" \
--output=jsonpath="{.items[0].status.podIP}"):$(kubectl get pod -n knative-serving -l "app=3scale-kourier-gateway" \
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CRD_OPTIONS ?= "crd:maxDescLen=0"
KSERVE_ENABLE_SELF_SIGNED_CA ?= false
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.26
SUCCESS_200_ISVC_IMG ?= success-200-isvc
ERROR_404_ISVC_IMG ?= error-404-isvc

## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
Expand Down Expand Up @@ -298,6 +300,18 @@ docker-build-qpext:
docker-build-push-qpext: docker-build-qpext
docker push ${KO_DOCKER_REPO}/${QPEXT_IMG}

docker-build-success-200-isvc:
cd python && docker buildx build -t ${KO_DOCKER_REPO}/${SUCCESS_200_ISVC_IMG} -f success_200_isvc.Dockerfile .

docker-push-success-200-isvc: docker-build-success-200-isvc
docker push ${KO_DOCKER_REPO}/${SUCCESS_200_ISVC_IMG}

docker-build-error-node-404:
cd python && docker buildx build -t ${KO_DOCKER_REPO}/${ERROR_404_ISVC_IMG} -f error_404_isvc.Dockerfile .

docker-push-error-node-404: docker-build-error-node-404
docker push ${KO_DOCKER_REPO}/${ERROR_404_ISVC_IMG}

test-qpext:
cd qpext && go test -v ./... -cover

Expand Down
Loading

0 comments on commit a73c949

Please sign in to comment.