Skip to content
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

Mlflow model server #49

Merged
merged 1 commit into from
Aug 12, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ const (
SKLEARN_SERVER PredictiveUnitImplementation = "SKLEARN_SERVER"
XGBOOST_SERVER PredictiveUnitImplementation = "XGBOOST_SERVER"
TENSORFLOW_SERVER PredictiveUnitImplementation = "TENSORFLOW_SERVER"
MLFLOW_SERVER PredictiveUnitImplementation = "MLFLOW_SERVER"
)

type PredictiveUnitMethod string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ var (
DefaultTFServerImageNameRest = "seldonio/tfserving-proxy_rest:0.3"
DefaultTFServerImageNameGrpc = "seldonio/tfserving-proxy_grpc:0.3"
TFServingContainerName = "tfserving"
DefaultMLFlowServerImageNameRest = "seldonio/mlflowserver_rest:0.1"
DefaultMLFlowServerImageNameGrpc = "seldonio/mlflowserver_grpc:0.1"
)

func addTFServerContainer(r *ReconcileSeldonDeployment, pu *machinelearningv1alpha2.PredictiveUnit, p *machinelearningv1alpha2.PredictorSpec, deploy *appsv1.Deployment) error {
Expand Down Expand Up @@ -139,7 +141,8 @@ func addTFServerContainer(r *ReconcileSeldonDeployment, pu *machinelearningv1alp

func addModelDefaultServers(r *ReconcileSeldonDeployment, pu *machinelearningv1alpha2.PredictiveUnit, p *machinelearningv1alpha2.PredictorSpec, deploy *appsv1.Deployment) error {
if *pu.Implementation == machinelearningv1alpha2.SKLEARN_SERVER ||
*pu.Implementation == machinelearningv1alpha2.XGBOOST_SERVER {
*pu.Implementation == machinelearningv1alpha2.XGBOOST_SERVER ||
*pu.Implementation == machinelearningv1alpha2.MLFLOW_SERVER {

ty := machinelearningv1alpha2.MODEL
pu.Type = &ty
Expand Down Expand Up @@ -170,6 +173,12 @@ func addModelDefaultServers(r *ReconcileSeldonDeployment, pu *machinelearningv1a
} else {
c.Image = DefaultXGBoostServerImageNameGrpc
}
} else if *pu.Implementation == machinelearningv1alpha2.MLFLOW_SERVER {
if pu.Endpoint.Type == machinelearningv1alpha2.REST {
c.Image = DefaultMLFlowServerImageNameRest
} else {
c.Image = DefaultMLFlowServerImageNameGrpc
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (h *SeldonDeploymentCreateUpdateHandler) MutatingSeldonDeploymentFn(ctx con
con := utils.GetContainerForPredictiveUnit(&p, pu.Name)

//only assign host and port if there's a container or it's a prepackaged model server
if *pu.Implementation != machinelearningv1alpha2.SKLEARN_SERVER && *pu.Implementation != machinelearningv1alpha2.XGBOOST_SERVER && *pu.Implementation != machinelearningv1alpha2.TENSORFLOW_SERVER && (con == nil || con.Name == "") {
if *pu.Implementation != machinelearningv1alpha2.SKLEARN_SERVER && *pu.Implementation != machinelearningv1alpha2.XGBOOST_SERVER && *pu.Implementation != machinelearningv1alpha2.TENSORFLOW_SERVER && *pu.Implementation != machinelearningv1alpha2.MLFLOW_SERVER && (con == nil || con.Name == "") {
continue
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func checkPredictiveUnits(pu *machinelearningv1alpha2.PredictiveUnit, p *machine

} else if *pu.Implementation == machinelearningv1alpha2.SKLEARN_SERVER ||
*pu.Implementation == machinelearningv1alpha2.XGBOOST_SERVER ||
*pu.Implementation == machinelearningv1alpha2.TENSORFLOW_SERVER {
*pu.Implementation == machinelearningv1alpha2.TENSORFLOW_SERVER ||
*pu.Implementation == machinelearningv1alpha2.MLFLOW_SERVER {
if pu.ModelURI == "" {
return false, "Predictive unit " + pu.Name + " modelUri required when using standalone servers"
}
Expand Down