Skip to content

Commit

Permalink
Use worksteal dist type for pytest
Browse files Browse the repository at this point in the history
Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
  • Loading branch information
sivanantha321 committed Feb 15, 2024
1 parent aef5ed0 commit ff76dcb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/minikube-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
using: "composite"
steps:
- name: Install kubectl
uses: azure/setup-kubectl@v4
uses: azure/setup-kubectl@v4.0.0
with:
version: 'v1.27.4'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ jobs:
uses: ./.github/actions/minikube-setup

- name: KServe dependency setup
uses: ./.github/actions/kserve-dep-setup\
uses: ./.github/actions/kserve-dep-setup
with:
deployment-mode: "raw"

Expand Down Expand Up @@ -790,7 +790,7 @@ jobs:
uses: ./.github/actions/minikube-setup

- name: KServe dependency setup
uses: ./.github/actions/kserve-dep-setup\
uses: ./.github/actions/kserve-dep-setup
with:
network-layer: "kourier"

Expand Down
15 changes: 12 additions & 3 deletions test/e2e/qpext/test_qpext.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
V1beta1SKLearnSpec,
)
from kubernetes.client import V1ResourceRequirements
from ..common.utils import KSERVE_TEST_NAMESPACE
from ..common.utils import KSERVE_TEST_NAMESPACE, get_cluster_ip
from ..common.utils import predict

logging.basicConfig(level=logging.INFO)
Expand All @@ -39,11 +39,12 @@
def test_qpext_kserve():
# test the qpext using the sklearn predictor
service_name = "sklearn-v2-metrics"
protocol_version = "v2"
predictor = V1beta1PredictorSpec(
min_replicas=1,
sklearn=V1beta1SKLearnSpec(
storage_uri="gs://seldon-models/sklearn/mms/lr_model",
protocol_version="v2",
protocol_version=protocol_version,
resources=V1ResourceRequirements(
requests={"cpu": "50m", "memory": "128Mi"},
limits={"cpu": "100m", "memory": "512Mi"},
Expand All @@ -65,8 +66,16 @@ def test_qpext_kserve():
kserve_client = KServeClient(config_file=os.environ.get("KUBECONFIG", "~/.kube/config"))
kserve_client.create(isvc)
kserve_client.wait_isvc_ready(service_name, namespace=KSERVE_TEST_NAMESPACE)
kserve_client.wait_model_ready(
service_name,
model_name=service_name,
isvc_namespace=KSERVE_TEST_NAMESPACE,
isvc_version=constants.KSERVE_V1BETA1_VERSION,
protocol_version=protocol_version,
cluster_ip=get_cluster_ip(),
)

res = predict(service_name, "./data/iris_input_v2.json", protocol_version="v2")
res = predict(service_name, "./data/iris_input_v2.json", protocol_version=protocol_version)
assert res["outputs"][0]["data"] == [1, 1]

send_metrics_request(kserve_client, service_name)
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/gh-actions/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ fi
PARALLELISM="${2:-1}"
source python/kserve/.venv/bin/activate
pushd test/e2e >/dev/null
pytest -m "$1" --ignore=qpext --log-level=INFO -o log_cli=true -n $PARALLELISM
pytest -m "$1" --ignore=qpext --log-level=INFO -o log_cli=true -n $PARALLELISM --dist worksteal
popd

0 comments on commit ff76dcb

Please sign in to comment.