Skip to content
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
Empty file.
71 changes: 71 additions & 0 deletions tests/integration/godog/features/pipeline/conditional.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
@PipelineDeployment @Functional @Pipelines @Conditional
Feature: Conditional pipeline with branching models
This pipeline uses a conditional model to route data to either add10 or mul10.

Scenario: Deploy tfsimple-conditional pipeline and wait for readiness
Given I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: conditional-nbsl
spec:
storageUri: "gs://seldon-models/scv2/samples/triton_23-03/conditional"
requirements:
- triton
- python
"""
And I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: add10-nbsl
spec:
storageUri: "gs://seldon-models/scv2/samples/triton_23-03/add10"
requirements:
- triton
- python
"""
And I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: mul10-nbsl
spec:
storageUri: "gs://seldon-models/scv2/samples/triton_23-03/mul10"
requirements:
- triton
- python
"""
Then the model "conditional-nbsl" should eventually become Ready with timeout "20s"
And the model "add10-nbsl" should eventually become Ready with timeout "20s"
And the model "mul10-nbsl" should eventually become Ready with timeout "20s"

And I deploy pipeline spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Pipeline
metadata:
name: tfsimple-conditional-nbsl
spec:
steps:
- name: conditional-nbsl
- name: mul10-nbsl
inputs:
- conditional-nbsl.outputs.OUTPUT0
tensorMap:
conditional-nbsl.outputs.OUTPUT0: INPUT
- name: add10-nbsl
inputs:
- conditional-nbsl.outputs.OUTPUT1
tensorMap:
conditional-nbsl.outputs.OUTPUT1: INPUT
output:
steps:
- mul10-nbsl
- add10-nbsl
stepsJoin: any
"""
Then the pipeline "tfsimple-conditional-nbsl" should eventually become Ready with timeout "40s"
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@PipelineDeployment @Functional @Pipelines @ModelChainingFromInputs
Feature: Pipeline model chaining using inputs and outputs
This pipeline chains tfsimple1 into tfsimple2 using both inputs and outputs.

Scenario: Deploy tfsimples-input pipeline and wait for readiness
Given I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: chain-from-input-tfsimple1-yhjo
spec:
storageUri: "gs://seldon-models/triton/simple"
requirements:
- tensorflow
memory: 100Ki

"""
And I deploy model spec with timeout "20s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: chain-from-input-tfsimple2-yhjo
spec:
storageUri: "gs://seldon-models/triton/simple"
requirements:
- tensorflow
memory: 100Ki
"""
Then the model "chain-from-input-tfsimple1-yhjo" should eventually become Ready with timeout "20s"
Then the model "chain-from-input-tfsimple2-yhjo" should eventually become Ready with timeout "20s"

And I deploy pipeline spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Pipeline
metadata:
name: chain-from-input-tfsimples-input-yhjo
spec:
steps:
- name: chain-from-input-tfsimple1-yhjo
- name: chain-from-input-tfsimple2-yhjo
inputs:
- chain-from-input-tfsimple1-yhjo.inputs.INPUT0
- chain-from-input-tfsimple1-yhjo.outputs.OUTPUT1
tensorMap:
chain-from-input-tfsimple1-yhjo.outputs.OUTPUT1: INPUT1
output:
steps:
- chain-from-input-tfsimple2-yhjo
"""
Then the pipeline "chain-from-input-tfsimples-input-yhjo" should eventually become Ready with timeout "40s"
56 changes: 56 additions & 0 deletions tests/integration/godog/features/pipeline/input_tensors.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@PipelineDeployment @Functional @Pipelines @PipelineInputTensors
Feature: Pipeline using direct input tensors
This pipeline directly routes pipeline input tensors INPUT0 and INPUT1 into separate models.

Scenario: Deploy pipeline-inputs pipeline and wait for readiness
Given I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: mul10-tw2x
spec:
storageUri: "gs://seldon-models/scv2/samples/triton_23-03/mul10"
requirements:
- triton
- python
"""
And I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: add10-tw2x
spec:
storageUri: "gs://seldon-models/scv2/samples/triton_23-03/add10"
requirements:
- triton
- python
"""
Then the model "mul10-tw2x" should eventually become Ready with timeout "20s"
And the model "add10-tw2x" should eventually become Ready with timeout "20s"

And I deploy pipeline spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Pipeline
metadata:
name: pipeline-inputs-tw2x
spec:
steps:
- name: mul10-tw2x
inputs:
- pipeline-inputs-tw2x.inputs.INPUT0
tensorMap:
pipeline-inputs-tw2x.inputs.INPUT0: INPUT
- name: add10-tw2x
inputs:
- pipeline-inputs-tw2x.inputs.INPUT1
tensorMap:
pipeline-inputs-tw2x.inputs.INPUT1: INPUT
output:
steps:
- mul10-tw2x
- add10-tw2x
"""
Then the pipeline "pipeline-inputs-tw2x" should eventually become Ready with timeout "20s"
67 changes: 67 additions & 0 deletions tests/integration/godog/features/pipeline/join.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
@PipelineDeployment @Functional @Pipelines @ModelJoin
Feature: Pipeline model join
This pipeline joins outputs from tfsimple1 and tfsimple2 and feeds them into tfsimple3.

Scenario: Deploy tfsimples-join pipeline and wait for readiness
Given I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: join-tfsimple1-w4e3
spec:
storageUri: "gs://seldon-models/triton/simple"
requirements:
- tensorflow
memory: 100Ki
"""
And I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: join-tfsimple2-w4e3
spec:
storageUri: "gs://seldon-models/triton/simple"
requirements:
- tensorflow
memory: 100Ki
"""
And I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: join-tfsimple3-w4e3
spec:
storageUri: "gs://seldon-models/triton/simple"
requirements:
- tensorflow
memory: 100Ki
"""
Then the model "join-tfsimple1-w4e3" should eventually become Ready with timeout "20s"
And the model "join-tfsimple2-w4e3" should eventually become Ready with timeout "20s"
And the model "join-tfsimple3-w4e3" should eventually become Ready with timeout "20s"

And I deploy pipeline spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Pipeline
metadata:
name: join-pipeline-w4e3
spec:
steps:
- name: join-tfsimple1-w4e3
- name: join-tfsimple2-w4e3
- name: join-tfsimple3-w4e3
inputs:
- join-tfsimple1-w4e3.outputs.OUTPUT0
- join-tfsimple2-w4e3.outputs.OUTPUT1
tensorMap:
join-tfsimple1-w4e3.outputs.OUTPUT0: INPUT0
join-tfsimple2-w4e3.outputs.OUTPUT1: INPUT1
output:
steps:
- join-tfsimple3-w4e3
"""
Then the pipeline "join-pipeline-w4e3" should eventually become Ready with timeout "40s"
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@ModelChaining @Functional @Pipelines
Feature: Pipeline model chaining
This pipeline chains tfsimple1 into tfsimple2 using tensorMap.

Scenario: Deploy tfsimples pipeline and wait for readiness
Given I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: model-chain-tfsimple1-iuw3
spec:
storageUri: "gs://seldon-models/triton/simple"
requirements:
- tensorflow
memory: 100Ki

"""
And I deploy model spec with timeout "20s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: model-chain-tfsimple2-iuw3
spec:
storageUri: "gs://seldon-models/triton/simple"
requirements:
- tensorflow
memory: 100Ki
"""
Then the model "model-chain-tfsimple1-iuw3" should eventually become Ready with timeout "20s"
Then the model "model-chain-tfsimple2-iuw3" should eventually become Ready with timeout "20s"
When I deploy pipeline spec with timeout "20s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Pipeline
metadata:
name: model-chain-tfsimples-iuw3
spec:
steps:
- name: model-chain-tfsimple1-iuw3
- name: model-chain-tfsimple2-iuw3
inputs:
- model-chain-tfsimple1-iuw3
tensorMap:
model-chain-tfsimple1-iuw3.outputs.OUTPUT0: INPUT0
model-chain-tfsimple1-iuw3.outputs.OUTPUT1: INPUT1
output:
steps:
- model-chain-tfsimple2-iuw3
"""
Then the pipeline "model-chain-tfsimples-iuw3" should eventually become Ready with timeout "40s"
59 changes: 59 additions & 0 deletions tests/integration/godog/features/pipeline/trigger_joins.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@PipelineDeployment @Functional @Pipelines @TriggerJoins
Feature: Pipeline using trigger joins
This pipeline uses trigger joins to decide whether mul10 or add10 should run.

Scenario: Deploy trigger-joins pipeline and wait for readiness
Given I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: mul10-99lo
spec:
storageUri: "gs://seldon-models/scv2/samples/triton_23-03/mul10"
requirements:
- triton
- python
"""
And I deploy model spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: add10-99lo
spec:
storageUri: "gs://seldon-models/scv2/samples/triton_23-03/add10"
requirements:
- triton
- python
"""
Then the model "mul10-99lo" should eventually become Ready with timeout "20s"
And the model "add10-99lo" should eventually become Ready with timeout "20s"

And I deploy pipeline spec with timeout "30s":
"""
apiVersion: mlops.seldon.io/v1alpha1
kind: Pipeline
metadata:
name: trigger-joins-99lo
spec:
steps:
- name: mul10-99lo
inputs:
- trigger-joins-99lo.inputs.INPUT
triggers:
- trigger-joins-99lo.inputs.ok1
- trigger-joins-99lo.inputs.ok2
triggersJoinType: any
- name: add10-99lo
inputs:
- trigger-joins-99lo.inputs.INPUT
triggers:
- trigger-joins-99lo.inputs.ok3
output:
steps:
- mul10-99lo
- add10-99lo
stepsJoin: any
"""
Then the pipeline "trigger-joins-99lo" should eventually become Ready with timeout "20s"
12 changes: 6 additions & 6 deletions tests/integration/godog/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ require (
github.com/sirupsen/logrus v1.9.3
github.com/spf13/pflag v1.0.7
google.golang.org/grpc v1.73.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.34.2
k8s.io/apimachinery v0.34.2
k8s.io/client-go v0.34.2
k8s.io/apiextensions-apiserver v0.34.3
k8s.io/apimachinery v0.34.3
k8s.io/client-go v0.34.3
sigs.k8s.io/controller-runtime v0.22.4
sigs.k8s.io/yaml v1.6.0
)

replace (
Expand Down Expand Up @@ -71,13 +71,13 @@ require (
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/apiextensions-apiserver v0.34.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.34.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
knative.dev/pkg v0.0.0-20250128013458-efddeac3ec35 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)
Loading
Loading