Skip to content

Commit

Permalink
Pipeline Persistence (#188)
Browse files Browse the repository at this point in the history
* initial pipeline db commit

* add loadbalancer for pipelines and rebalance

* allow modelgateway to do retries

* Makefile fixes for host

* ensure pipeline updates sent

* test on k8s

* lint

* check for db

* review comments

* review comments

* review fixes
  • Loading branch information
ukclivecox authored May 24, 2022
1 parent ede182a commit 87c0a32
Show file tree
Hide file tree
Showing 32 changed files with 11,312 additions and 379 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ deploy-k8s:

.PHONY: undeploy-k8s
undeploy-k8s:
kubectl delete -f k8s/yaml/seldon-v2-servers.yaml
kubectl delete -f k8s/yaml/seldon-v2-components.yaml
kubectl delete -f k8s/yaml/seldon-v2-crds.yaml

kubectl delete --ignore-not-found=true -f k8s/seldon-v2-servers.yaml
kubectl delete --ignore-not-found=true -f k8s/seldon-v2-components.yaml
kubectl delete --ignore-not-found=true -f k8s/seldon-v2-crds.yaml

#
# Dev
Expand Down
1 change: 1 addition & 0 deletions apis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ build:
./mlops/agent_debug/agent_debug.proto \
./mlops/proxy/proxy.proto \
./mlops/scheduler/scheduler.proto \
./mlops/scheduler/storage.proto \
./mlops/chainer/chainer.proto \
./mlops/v2_dataplane/v2_dataplane.proto

Expand Down
549 changes: 284 additions & 265 deletions apis/mlops/scheduler/scheduler.pb.go

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions apis/mlops/scheduler/scheduler.proto
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,11 @@ message ExperimentStatusRequest {

message Pipeline {
string name = 1;
repeated PipelineStep steps = 2;
optional PipelineOutput output = 3;
optional KubernetesMeta kubernetesMeta = 4;
string uid = 2;
uint32 version = 3;
repeated PipelineStep steps = 4;
optional PipelineOutput output = 5;
optional KubernetesMeta kubernetesMeta = 6;
}

message PipelineStep {
Expand Down
184 changes: 184 additions & 0 deletions apis/mlops/scheduler/storage.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions apis/mlops/scheduler/storage.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
syntax = "proto3";

package seldon.mlops.scheduler;

option go_package = "github.com/seldonio/seldon-core/scheduler/apis/mlops/scheduler";

import "mlops/scheduler/scheduler.proto";

message PipelineSnapshot {
string name = 1;
uint32 lastVersion = 2;
repeated PipelineWithState versions = 3;
bool deleted = 4;
}
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ spec:
- args:
- --http-port=9010
- --grpc-port=9011
- --metrics-port=9006
- --config-path=/mnt/config/kafka.json
command:
- /bin/pipelinegateway
Expand All @@ -788,6 +789,9 @@ spec:
- containerPort: 9011
name: grpc
protocol: TCP
- containerPort: 9006
name: metrics
protocol: TCP
resources:
requests:
cpu: '{{ .Values.pipelinegateway.resources.requests.cpu }}'
Expand All @@ -805,7 +809,7 @@ spec:
name: config-volume
---
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
labels:
control-plane: seldon-scheduler
Expand All @@ -816,6 +820,7 @@ spec:
selector:
matchLabels:
control-plane: seldon-scheduler
serviceName: seldon-scheduler
template:
metadata:
labels:
Expand All @@ -824,6 +829,7 @@ spec:
containers:
- args:
- --pipeline-gateway-host=seldon-pipelinegateway
- --pipeline-db-path=/mnt/scheduler/pipelinedb
command:
- /bin/scheduler
image: seldonio/seldon-scheduler:latest
Expand All @@ -842,10 +848,22 @@ spec:
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- mountPath: /mnt/scheduler
name: scheduler-state
securityContext:
runAsUser: 8888
serviceAccountName: seldon-scheduler
terminationGracePeriodSeconds: 5
volumeClaimTemplates:
- metadata:
name: scheduler-state
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: mlops.seldon.io/v1alpha1
kind: ServerConfig
Expand Down
Loading

0 comments on commit 87c0a32

Please sign in to comment.