Skip to content

ci: Merge changes from v2 to release 2.8 branch (for 2.8.1) #5460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/smoke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ load model ./models/tfsimple1.yaml
load model ./models/tfsimple2.yaml
status model tfsimple1
status model tfsimple2
load "pipeline" ./pipelines/tfsimples.yaml
load pipeline ./pipelines/tfsimples.yaml
status pipeline tfsimples
seldon pipeline infer tfsimples '{"inputs":[{"name":"INPUT0","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"datatype":"INT32","shape":[1,16]},{"name":"INPUT1","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"datatype":"INT32","shape":[1,16]}]}'
seldon pipeline infer tfsimples --inference-mode grpc '{"model_name":"simple","inputs":[{"name":"INPUT0","contents":{"int_contents":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},"datatype":"INT32","shape":[1,16]},{"name":"INPUT1","contents":{"int_contents":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},"datatype":"INT32","shape":[1,16]}]}'
Expand Down
62 changes: 56 additions & 6 deletions samples/stress-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# usage: ./stress-tests.sh [count] [kubectl|seldon] [namespace] [model]
# usage: ./stress-tests.sh [count] [kubectl|seldon] [namespace] [task]
# task is a name of a function that will be called from the list below
# tfsimple
# iris
# tfsimple_pipeline
# tfsimple_join_pipeline

if [ -z "$1" ]
then
Expand All @@ -23,9 +28,9 @@ fi

if [ -z "$4" ]
then
model="tfsimple"
task="tfsimple"
else
model=$4
task=$4
fi

function load() {
Expand Down Expand Up @@ -92,7 +97,10 @@ function status() {
fi
}

function create_tfsimple() {
############################################################################################################
# The following functions are the `task` options that can be called by the user.

function tfsimple() {
echo $i
sed 's/name: tfsimple1/name: tfsimple'"$1"'/g' models/tfsimple1.yaml > /tmp/models/tfsimple${1}.yaml
load model /tmp/models/tfsimple${1}.yaml
Expand All @@ -102,7 +110,7 @@ function create_tfsimple() {
unload model tfsimple${1} /tmp/models/tfsimple${1}.yaml
}

function create_iris() {
function iris() {
echo $i
sed 's/name: iris/name: iris'"$1"'/g' models/iris-v1.yaml > /tmp/models/iris${1}.yaml
load model /tmp/models/iris${1}.yaml
Expand All @@ -112,8 +120,50 @@ function create_iris() {
unload model iris${1} /tmp/models/iris${1}.yaml
}

function tfsimple_pipeline() {
echo $i
sed 's/name: tfsimples/name: tfsimples'"$1"'/g' pipelines/tfsimples.yaml > /tmp/pipelines/tfsimples${1}.yaml
load model ./models/tfsimple1.yaml
load model ./models/tfsimple2.yaml
status model tfsimple1
status model tfsimple2
load pipeline /tmp/pipelines/tfsimples${1}.yaml
status pipeline tfsimples${1}
seldon pipeline infer tfsimples${1} '{"inputs":[{"name":"INPUT0","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"datatype":"INT32","shape":[1,16]},{"name":"INPUT1","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"datatype":"INT32","shape":[1,16]}]}'
seldon pipeline infer tfsimples${1} --inference-mode grpc '{"model_name":"simple","inputs":[{"name":"INPUT0","contents":{"int_contents":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},"datatype":"INT32","shape":[1,16]},{"name":"INPUT1","contents":{"int_contents":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},"datatype":"INT32","shape":[1,16]}]}'
unload pipeline tfsimples${1} /tmp/pipelines/tfsimples${1}.yaml
# we cant unload the models here as they are used by other pipelines
# TODO: create sub models for each pipeline?
# unload model tfsimple1 ./models/tfsimple1.yaml
# unload model tfsimple2 ./models/tfsimple2.yaml
}

function tfsimple_join_pipeline() {
echo $i
sed 's/name: join/name: join'"$1"'/g' pipelines/tfsimples-join.yaml > /tmp/pipelines/tfsimples-join${1}.yaml
load model ./models/tfsimple1.yaml
load model ./models/tfsimple2.yaml
load model ./models/tfsimple3.yaml
status model tfsimple1
status model tfsimple2
status model tfsimple3
load pipeline /tmp/pipelines/tfsimples-join${1}.yaml
status pipeline join${1}
seldon pipeline infer join${1} '{"inputs":[{"name":"INPUT0","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"datatype":"INT32","shape":[1,16]},{"name":"INPUT1","data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],"datatype":"INT32","shape":[1,16]}]}'
seldon pipeline infer join${1} --inference-mode grpc '{"model_name":"simple","inputs":[{"name":"INPUT0","contents":{"int_contents":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},"datatype":"INT32","shape":[1,16]},{"name":"INPUT1","contents":{"int_contents":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]},"datatype":"INT32","shape":[1,16]}]}'
unload pipeline join${1} /tmp/pipelines/tfsimples-join${1}.yaml
# we cant unload the models here as they are used by other pipelines
# TODO: create sub models for each pipeline?
# unload model tfsimple1 ./models/tfsimple1.yaml
# unload model tfsimple2 ./models/tfsimple2.yaml
# unload model tfsimple3 ./models/tfsimple3.yaml
}

############################################################################################################

mkdir /tmp/models
mkdir /tmp/pipelines
for i in $(seq 1 $count);
do
create_$model $i &
$task $i &
done
2 changes: 1 addition & 1 deletion scheduler/Dockerfile.agent
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk add --no-cache make
RUN make -C scheduler -o test-go build-agent

# Copy binary
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-13
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-15

RUN mkdir /mnt/agent && chmod o+rwx /mnt/agent
VOLUME /mnt/agent
Expand Down
2 changes: 1 addition & 1 deletion scheduler/Dockerfile.envoy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM envoyproxy/envoy:v1.29.2 as envoy

FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-13
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-15

COPY --from=envoy /usr/local/bin/envoy /usr/local/bin/envoy

Expand Down
2 changes: 1 addition & 1 deletion scheduler/Dockerfile.modelgateway
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN make -C scheduler -o test-go build-modelgateway
FROM registry.access.redhat.com/ubi9/ubi-minimal as certs

# Kafka dependencies necessitate leaving CGo enabled and using a base image with C dependencies
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-13
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-15

# Kafka OIDC token retrieve certs (librdkafka using curl): https://github.com/confluentinc/librdkafka/issues/3751
COPY --from=certs /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
Expand Down
2 changes: 1 addition & 1 deletion scheduler/Dockerfile.pipelinegateway
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN make -C scheduler -o test-go build-pipelinegateway
FROM registry.access.redhat.com/ubi9/ubi-minimal as certs

# Kafka dependencies necessitate leaving CGo enabled and using a base image with C dependencies
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-13
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-15

# Kafka OIDC token retrieve certs (librdkafka using curl): https://github.com/confluentinc/librdkafka/issues/3751
COPY --from=certs /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
Expand Down
2 changes: 1 addition & 1 deletion scheduler/Dockerfile.scheduler
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get install make
RUN make -C scheduler -o test-go build-scheduler

# Kafka dependencies necessitate leaving CGo enabled and using a base image with C dependencies
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-13
FROM registry.access.redhat.com/ubi9/ubi-micro:9.3-15
COPY --from=builder /build/scheduler/bin/scheduler /bin/scheduler

# Copy licenses
Expand Down
4 changes: 3 additions & 1 deletion scheduler/data-flow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ dependencies {
implementation("com.michael-bull.kotlin-retry:kotlin-retry:1.0.9")

// k8s
implementation("io.kubernetes:client-java:20.0.0")
implementation("io.kubernetes:client-java:20.0.1") {
exclude("com.microsoft.azure", "adal4j")
}

testImplementation(kotlin("test"))
testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.2")
Expand Down