Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,048 additions
and
703 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
pipeline/pipeline_steps/loanclassifier-explainer/loanclassifiermodel-explainer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: machinelearning.seldon.io/v1alpha2 | ||
kind: SeldonDeployment | ||
metadata: | ||
labels: | ||
app: seldon | ||
name: loanclassifier-explainer | ||
spec: | ||
name: loanclassifier-explainer | ||
predictors: | ||
- componentSpecs: | ||
- spec: | ||
containers: | ||
- image: loanclassifier-explainer:0.1 | ||
name: model-explainer | ||
graph: | ||
children: [] | ||
name: model-explainer | ||
type: MODEL | ||
endpoint: | ||
type: REST | ||
name: loanclassifier-explainer | ||
replicas: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
MODEL_NAME=Model | ||
API_TYPE=REST | ||
SERVICE_TYPE=MODEL | ||
PERSISTENCE=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import dill | ||
|
||
class Model: | ||
def __init__(self, *args, **kwargs): | ||
|
||
with open("preprocessor.dill", "rb") as prep_f: | ||
self.preprocessor = dill.load(prep_f) | ||
with open("model.dill", "rb") as model_f: | ||
self.clf = dill.load(model_f) | ||
|
||
def predict(self, X, feature_names=[]): | ||
X_prep = self.preprocessor.transform(X) | ||
proba = self.clf.predict_proba(X_prep) | ||
return proba |
22 changes: 22 additions & 0 deletions
22
pipeline/pipeline_steps/loanclassifier/loanclassifiermodel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: machinelearning.seldon.io/v1alpha2 | ||
kind: SeldonDeployment | ||
metadata: | ||
labels: | ||
app: seldon | ||
name: loanclassifier | ||
spec: | ||
name: loanclassifier | ||
predictors: | ||
- componentSpecs: | ||
- spec: | ||
containers: | ||
- image: loanclassifier:0.1 | ||
name: model | ||
graph: | ||
children: [] | ||
name: model | ||
type: MODEL | ||
endpoint: | ||
type: REST | ||
name: loanclassifier | ||
replicas: 1 |
Binary file not shown.
Binary file not shown.