-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
I have an XGBoost model that I want to run in Triton server. Currently I'm using the model to get raw prediction probability like this:
model = xgb.XGBClassifier()
model.load_model(str(model_path))
dmat_input = np.reshape(fv, (-1, len(fv)))
dmatrix = xgb.DMatrix(dmat_input, missing=0.0)
probs = model.get_booster().predict(dmatrix, validate_features=False)
return float(probs[0])
When I run the model in Triton I get results that look like the values that I would get it I was doing model.predict_proba()
, which is not what I want for my use-case. I want to get the raw booster probability. Is it possible to do so? Below is my config.pbtxt
:
name: "mymodel"
backend: "fil"
max_batch_size: 128
input [
{
name: "input__0"
data_type: TYPE_FP32
dims: [ 2545 ]
}
]
output [
{
name: "output__0"
data_type: TYPE_FP32
dims: [ 1 ]
}
]
instance_group [
{
kind: KIND_CPU
}
]
default_model_filename: "mymodel.json"
parameters [
{
key: "model_type"
value: { string_value: "xgboost_json" }
},
{
key: "predict_proba"
value: { string_value: "false" }
},
{
key: "threshold"
value: { string_value: "0.5" }
},
{
key: "output_class"
value: { string_value: "false" }
}
]
Metadata
Metadata
Assignees
Labels
No labels