MLServer
MLServer copied to clipboard
Allow passing complex inputs to explanations
Currently we allow users to pass in runtime explain parameters via setting explain_parameters in the parameters field of the explanation payload.
This allows only basic types.
In some cases the user would want to pass in an additional input (or set of inputs) that are tensor based. In this case we want to be able to send them as part of the inputs field of the inference protocol.
We could add an extra flag in the parameters field of these inputs to indicate that there are additional inputs for explanations. e.g.
"inputs": [
{
"name": "mask",
"shape": [2, 2],
"datatype": "FP32",
"data": [1., 1., 1., 1.],
"parameters": {
"content_type": "np",
"field_type": "alibi-explain",
}
},
{
"name": "volatile acidity",
"shape": [1],
"datatype": "FP32",
"data": [0.7000],
"parameters": {
"content_type": "np"
}
},
},...]
In the above example we would have volatile acidity as the standard infer payload to explain and mask as an additional explain parameter to pass through.